elkir / iccs23-hacakthon-delorean-datasets

MIT License
2 stars 2 forks source link

create a Slurm accumulator job that waits for completion of array job #16

Open elkir opened 1 year ago

christopheredsall commented 1 year ago

Sketch of design. Use the --paresable flag to sbatch to get the job id as a bash variable, e.g.

[cje57@login-e-1 slurm-requests]$ JOB1=$(sbatch --parsable dummy.sh )
[cje57@login-e-1 slurm-requests]$ echo $JOB1
23874559

Have a run_workflow.sh that does something like

#!/bin/bash

# Submit three slurm jobs to do the end to end processing

# Pre-processing
PRE=$(sbatch --parsable pre-script)

# Per file processing as array job
PROC=$(sbatch --parsable --dependency=afterok${PRE} )

# Post-processing (accumulation)
POST=$(sbatch --parsable --dependancy=afterok${POST} )