From c5abcd75f237c3fc03e13a9550404a3a391b31c6 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Tue, 8 Sep 2020 12:03:00 +0200 Subject: Just use project structure in backends We have to pass the crystfelproject anyway, to add the new results to the list. It seems messy to pass everything else separately, when at this moment the values must be exactly what is in the project structure anyway. --- src/gui_backend_slurm.c | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) (limited to 'src/gui_backend_slurm.c') diff --git a/src/gui_backend_slurm.c b/src/gui_backend_slurm.c index d10c5d4b..53bee2bc 100644 --- a/src/gui_backend_slurm.c +++ b/src/gui_backend_slurm.c @@ -318,14 +318,8 @@ static void write_partial_file_list(GFile *workdir, static void *run_indexing(const char *job_title, const char *job_notes, - char **filenames, - char **events, - int n_frames, - char *geom_filename, - struct peak_params *peak_search_params, - struct index_params *indexing_params, - void *opts_priv, - struct crystfelproject *proj) + struct crystfelproject *proj, + void *opts_priv) { struct slurm_indexing_opts *opts = opts_priv; struct slurm_job *job; @@ -376,9 +370,9 @@ static void *run_indexing(const char *job_title, job = malloc(sizeof(struct slurm_job)); if ( job == NULL ) return 0; - job->n_frames = n_frames; - job->n_blocks = n_frames / opts->block_size; - if ( n_frames % opts->block_size ) job->n_blocks++; + job->n_frames = proj->n_frames; + job->n_blocks = proj->n_frames / opts->block_size; + if ( proj->n_frames % opts->block_size ) job->n_blocks++; STATUS("Splitting job into %i blocks of max %i frames\n", job->n_blocks, opts->block_size); @@ -411,9 +405,11 @@ static void *run_indexing(const char *job_title, write_partial_file_list(workdir_file, file_list, i, opts->block_size, - filenames, events, n_frames); + proj->filenames, + proj->events, + proj->n_frames); - job_id = submit_batch_job(geom_filename, + job_id = submit_batch_job(proj->geom_filename, file_list, stream_filename, opts->email_address, @@ -424,8 +420,8 @@ static void *run_indexing(const char *job_title, workdir, stderr_file, stdout_file, - peak_search_params, - indexing_params); + &proj->peak_search_params, + &proj->indexing_params); if ( job_id == 0 ) { fail = 1; -- cgit v1.2.3