diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/gui_backend_local.c | 9 | ||||
-rw-r--r-- | src/gui_backend_slurm.c | 12 | ||||
-rw-r--r-- | src/gui_index.c | 3 | ||||
-rw-r--r-- | src/gui_project.h | 5 |
4 files changed, 25 insertions, 4 deletions
diff --git a/src/gui_backend_local.c b/src/gui_backend_local.c index a43e3632..e63d8379 100644 --- a/src/gui_backend_local.c +++ b/src/gui_backend_local.c @@ -152,7 +152,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 local_indexing_opts *opts = opts_priv; GIOChannel *ioch; @@ -170,6 +171,7 @@ static void *run_indexing(const char *job_title, GFile *cwd_file; GFile *notes_file; char *notes_path; + char **streams; FILE *fh; workdir = strdup(job_title); @@ -254,6 +256,11 @@ static void *run_indexing(const char *job_title, index_readable, job); + streams = malloc(sizeof(char *)); + if ( streams != NULL ) { + streams[0] = strdup("crystfel.stream"); + add_result(proj, job_title, streams, 1); + } return job; } 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; } diff --git a/src/gui_index.c b/src/gui_index.c index f4ca21db..60f93c61 100644 --- a/src/gui_index.c +++ b/src/gui_index.c @@ -104,7 +104,8 @@ static int run_indexing_all(struct crystfelproject *proj, proj->geom_filename, &proj->peak_search_params, &proj->indexing_params, - be->indexing_opts_priv); + be->indexing_opts_priv, + proj); if ( job_priv != NULL ) { add_running_task(proj, "Indexing all frames", diff --git a/src/gui_project.h b/src/gui_project.h index c241b6f8..af0335bb 100644 --- a/src/gui_project.h +++ b/src/gui_project.h @@ -85,6 +85,8 @@ struct index_params { float push_res; }; +struct crystfelproject; + struct crystfel_backend { const char *name; @@ -103,7 +105,8 @@ struct crystfel_backend { char *geom_filename, struct peak_params *peak_search_params, struct index_params *indexing_params, - void *opts_priv); + void *opts_priv, + struct crystfelproject *proj); /* Called to ask the backend to cancel the job */ void (*cancel_task)(void *job_priv); |