aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/gui_backend_local.c5
-rw-r--r--src/gui_backend_slurm.c5
-rw-r--r--src/gui_merge.c10
-rw-r--r--src/gui_merge.h3
4 files changed, 17 insertions, 6 deletions
diff --git a/src/gui_backend_local.c b/src/gui_backend_local.c
index ba56bd7c..06d95689 100644
--- a/src/gui_backend_local.c
+++ b/src/gui_backend_local.c
@@ -454,6 +454,7 @@ static void *run_merging(const char *job_title,
gchar *stderr_rel_filename;
gchar *stdout_rel_filename;
gchar *harvest_rel_filename;
+ gchar *log_folder_rel;
workdir = make_job_folder(job_title, job_notes);
if ( workdir == NULL ) return NULL;
@@ -463,13 +464,15 @@ static void *run_merging(const char *job_title,
stdout_rel_filename = relative_to_cwd(workdir, "stdout.log");
stderr_rel_filename = relative_to_cwd(workdir, "stderr.log");
harvest_rel_filename = relative_to_cwd(workdir, "parameters.json");
+ log_folder_rel = relative_to_cwd(workdir, "pr-logs");
snprintf(n_thread_str, 63, "%i", opts->n_threads);
if ( !write_merge_script(sc_rel_filename, input, n_thread_str,
&proj->merging_params, output_rel_filename,
stdout_rel_filename, stderr_rel_filename,
- harvest_rel_filename) )
+ harvest_rel_filename,
+ log_folder_rel) )
{
char *args[3];
enum gui_job_type type;
diff --git a/src/gui_backend_slurm.c b/src/gui_backend_slurm.c
index 8007b398..1526bb3b 100644
--- a/src/gui_backend_slurm.c
+++ b/src/gui_backend_slurm.c
@@ -926,6 +926,7 @@ static void *run_merging(const char *job_title,
char *stdout_rel_filename;
char *stderr_rel_filename;
char *harvest_rel_filename;
+ char *log_folder_rel;
workdir = make_job_folder(job_title, job_notes);
if ( workdir == NULL ) return NULL;
@@ -935,11 +936,13 @@ static void *run_merging(const char *job_title,
stdout_rel_filename = relative_to_cwd(workdir, "stdout.log");
stderr_rel_filename = relative_to_cwd(workdir, "stderr.log");
harvest_rel_filename = relative_to_cwd(workdir, "parameters.json");
+ log_folder_rel = relative_to_cwd(workdir, "pr-logs");
if ( !write_merge_script(sc_rel_filename, input, "`nproc`",
&proj->merging_params, output_rel_filename,
stdout_rel_filename, stderr_rel_filename,
- harvest_rel_filename) )
+ harvest_rel_filename,
+ log_folder_rel) )
{
enum gui_job_type type;
if ( strcmp(proj->merging_params.model, "process_hkl") == 0 ) {
diff --git a/src/gui_merge.c b/src/gui_merge.c
index ca3c3a46..51e0d8d4 100644
--- a/src/gui_merge.c
+++ b/src/gui_merge.c
@@ -352,7 +352,8 @@ static int write_partialator_script(const char *filename,
const char *out_hkl,
const char *stdout_filename,
const char *stderr_filename,
- const char *harvest_filename)
+ const char *harvest_filename,
+ const char *log_folder)
{
FILE *fh;
char *exe_path;
@@ -412,6 +413,7 @@ static int write_partialator_script(const char *filename,
fprintf(fh, " --iterations=%i", params->niter);
fprintf(fh, " --harvest-file=%s", harvest_filename);
+ fprintf(fh, " --log-folder=%s", log_folder);
fprintf(fh, " >%s 2>%s\n", stdout_filename, stderr_filename);
@@ -495,7 +497,8 @@ int write_merge_script(const char *filename,
const char *out_hkl,
const char *stdout_filename,
const char *stderr_filename,
- const char *harvest_filename)
+ const char *harvest_filename,
+ const char *log_folder)
{
if ( strcmp(params->model, "process_hkl") == 0 ) {
return write_process_hkl_script(filename, input,
@@ -507,7 +510,8 @@ int write_merge_script(const char *filename,
params, out_hkl,
stdout_filename,
stderr_filename,
- harvest_filename);
+ harvest_filename,
+ log_folder);
}
}
diff --git a/src/gui_merge.h b/src/gui_merge.h
index 36b077aa..1bd86a2b 100644
--- a/src/gui_merge.h
+++ b/src/gui_merge.h
@@ -44,7 +44,8 @@ extern int write_merge_script(const char *filename,
const char *out_hkl,
const char *stdout_filename,
const char *stderr_filename,
- const char *harvest_filename);
+ const char *harvest_filename,
+ const char *log_folder);
extern double read_merge_progress(const char *logfile_str,
enum gui_job_type type);