aboutsummaryrefslogtreecommitdiff
path: root/src/gui_backend_slurm.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2020-09-04 15:53:33 +0200
committerThomas White <taw@physics.org>2020-09-04 15:53:33 +0200
commita1a4d92fd5814bd1b7f8fb1426e191e6ad5be54e (patch)
tree170cb8a08f2cfcc2700f8b6d333ee47c244a90cd /src/gui_backend_slurm.c
parent601aec99d95fb98f936e1d417370c957dd31d02e (diff)
Add results from new indexing job
Diffstat (limited to 'src/gui_backend_slurm.c')
-rw-r--r--src/gui_backend_slurm.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/gui_backend_slurm.c b/src/gui_backend_slurm.c
index 504bf3d4..9dced865 100644
--- a/src/gui_backend_slurm.c
+++ b/src/gui_backend_slurm.c
@@ -324,7 +324,8 @@ static void *run_indexing(const char *job_title,
char *geom_filename,
struct peak_params *peak_search_params,
struct index_params *indexing_params,
- void *opts_priv)
+ void *opts_priv,
+ struct crystfelproject *proj)
{
struct slurm_indexing_opts *opts = opts_priv;
struct slurm_job *job;
@@ -339,6 +340,7 @@ static void *run_indexing(const char *job_title,
int n_env;
int i;
int fail = 0;
+ char **streams;
workdir = strdup(job_title);
if ( workdir == NULL ) return NULL;
@@ -386,6 +388,9 @@ static void *run_indexing(const char *job_title,
job->stderr_filenames = malloc(job->n_blocks * sizeof(char *));
if ( job->stderr_filenames == NULL ) return NULL;
+ streams = malloc(job->n_blocks*sizeof(char *));
+ if ( streams == NULL ) return NULL;
+
for ( i=0; i<job->n_blocks; i++ ) {
char job_name[128];
@@ -433,6 +438,8 @@ 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);
+
STATUS("Submitted SLURM job ID %i\n", job_id);
}
@@ -446,6 +453,9 @@ static void *run_indexing(const char *job_title,
free(job->stderr_filenames);
free(job);
return NULL;
+ } else {
+ add_result(proj, strdup(job_title),
+ streams, job->n_blocks);
}
return job;
}