aboutsummaryrefslogtreecommitdiff
path: root/src/gui_backend_slurm.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2021-03-04 14:48:17 +0100
committerThomas White <taw@physics.org>2021-03-04 14:48:17 +0100
commit7ad46ee64f13892667c370c1f06f94a3f4e42d76 (patch)
treed83a56c0abfa4b526fa9afde07742b914fdbb8f0 /src/gui_backend_slurm.c
parentbbb08bef7ede9050c23a0309475d170a68631d6e (diff)
SLURM: Set serial offset for indexamajig jobs
Diffstat (limited to 'src/gui_backend_slurm.c')
-rw-r--r--src/gui_backend_slurm.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gui_backend_slurm.c b/src/gui_backend_slurm.c
index f9e5d0a1..57e8686f 100644
--- a/src/gui_backend_slurm.c
+++ b/src/gui_backend_slurm.c
@@ -579,6 +579,7 @@ static void *run_indexing(const char *job_title,
char *sc_filename;
int n_blocks;
char array_inx[128];
+ char serial_offs[128];
workdir = make_job_folder(job_title, job_notes);
if ( workdir == NULL ) return NULL;
@@ -621,13 +622,15 @@ static void *run_indexing(const char *job_title,
if ( sc_filename == NULL ) return NULL;
snprintf(array_inx, 127, "0-%i", n_blocks-1);
+ snprintf(serial_offs, 127, "$((${SLURM_ARRAY_TASK_ID}*%i))",
+ opts->block_size);
if ( !write_indexamajig_script(sc_filename,
proj->geom_filename,
"`nproc`",
"files-${SLURM_ARRAY_TASK_ID}.lst",
"crystfel-${SLURM_ARRAY_TASK_ID}.stream",
- 0,
+ serial_offs, 0,
&proj->peak_search_params,
&proj->indexing_params) )
{