Created
August 27, 2015 18:22
-
-
Save wtbarnes/e4e967c4ffdc8a12d45b to your computer and use it in GitHub Desktop.
shell script for starting large number of jobs greater than SLURM policy allows by delaying job array submission by some interval
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MAX_NUM=6678 | |
MAX_JOBS=500 | |
DELTA=$((MAX_JOBS - 1)) | |
echo "Beginning job submission on "`date` >> batch_job_status.out | |
for i in `seq 0 $MAX_JOBS $MAX_NUM` | |
do | |
A=$i | |
B=$((i+DELTA)) | |
if [ $B -gt $MAX_NUM ]; | |
then | |
D=$((B - MAX_NUM)) | |
B=$((A+DELTA-D)) | |
fi | |
echo "Submitting jobs $A-$B" >> batch_job_status.out | |
sbatch --array=$A-$B job_array.slurm >> batch_job_status.out | |
sleep 100 | |
done | |
echo "Job submission completed." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment