Last active
November 4, 2021 23:09
-
-
Save mxxo/35d788576e5960c6f62d94ec048d5e91 to your computer and use it in GitHub Desktop.
Slurm script for running EGSnrc user codes as a job array
This file contains hidden or 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
#!/bin/bash | |
# SLURM_ARRAY_TASK_ID will range from 1 to 10 | |
#SBATCH --array=1-10 | |
# adjust time limits as needed | |
#SBATCH --time=02:00:00 | |
# run the user code using the input.egsinp file on ten cores | |
# note: * each run will use a different set of initial random numbers | |
# * the -s flag forces EGSnrc to use a simple job control object (no locking) | |
user_code -i input.egsinp -p pegs_data.pegs4dat -b -P 10 -j $SLURM_ARRAY_TASK_ID -s | |
# this will result in 10 egsdat files, which must be combined manually afterwards | |
# using calculation=combine in the input file. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment