aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2020-09-08 11:22:52 +0200
committerThomas White <taw@physics.org>2020-09-08 16:16:48 +0200
commit1501d5ff2d0eb6d485beed579d5e1051682d5cc5 (patch)
tree1665f0593380553d9a94fe9ac7c5a1f7fd0aef60
parente15687963dd10cbb3a0cca0c4bfd08133b6d4814 (diff)
Local/SLURM BE: Add full path to stream in results
-rw-r--r--src/gui_backend_local.c9
-rw-r--r--src/gui_backend_slurm.c6
2 files changed, 12 insertions, 3 deletions
diff --git a/src/gui_backend_local.c b/src/gui_backend_local.c
index 1bddc1be..6d385d82 100644
--- a/src/gui_backend_local.c
+++ b/src/gui_backend_local.c
@@ -200,7 +200,6 @@ static void *run_indexing(const char *job_title,
fclose(fh);
g_free(notes_path);
g_object_unref(notes_file);
- g_object_unref(workdir_file);
job = malloc(sizeof(struct local_job));
if ( job == NULL ) return NULL;
@@ -241,6 +240,7 @@ static void *run_indexing(const char *job_title,
if ( r == FALSE ) {
ERROR("Failed to run indexamajig: %s\n",
error->message);
+ g_object_unref(workdir_file);
free(job);
return NULL;
}
@@ -258,9 +258,14 @@ static void *run_indexing(const char *job_title,
streams = malloc(sizeof(char *));
if ( streams != NULL ) {
- streams[0] = strdup("crystfel.stream");
+ GFile *stream_gfile = g_file_get_child(workdir_file,
+ "crystfel.stream");
+ streams[0] = g_file_get_path(stream_gfile);
+ g_object_unref(stream_gfile);
add_result(proj, strdup(job_title), streams, 1);
}
+
+ g_object_unref(workdir_file);
return job;
}
diff --git a/src/gui_backend_slurm.c b/src/gui_backend_slurm.c
index 9dced865..d10c5d4b 100644
--- a/src/gui_backend_slurm.c
+++ b/src/gui_backend_slurm.c
@@ -400,6 +400,7 @@ static void *run_indexing(const char *job_title,
char stdout_file[128];
int job_id;
GFile *stderr_gfile;
+ GFile *stream_gfile;
snprintf(job_name, 127, "%s-%i", job_title, i);
snprintf(file_list, 127, "files-%i.lst", i);
@@ -438,7 +439,10 @@ static void *run_indexing(const char *job_title,
job->stderr_filenames[i] = g_file_get_path(stderr_gfile);
g_object_unref(stderr_gfile);
- streams[i] = strdup(stream_filename);
+ stream_gfile = g_file_get_child(workdir_file,
+ stream_filename);
+ streams[i] = g_file_get_path(stream_gfile);
+ g_object_unref(stream_gfile);
STATUS("Submitted SLURM job ID %i\n", job_id);
}