Created
December 9, 2017 07:15
-
-
Save Colelyman/3e866d344201903365aeda3ca71721de to your computer and use it in GitHub Desktop.
Some tricks for doing cool things with sbatch scripts.
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
# start a job after another job succeeds | |
JOBID=$(sbatch --parsable job1.sh) && sbatch --dependency=afterok:$JOBID job2.sh | |
# start a job after another job fails | |
JOBID=$(sbatch --parsable job1.sh) && sbatch --dependency=afternotok:$JOBID job2.sh | |
# get the time and memory of a running node | |
sstat --format="CPUTime,Elapsed,MaxRSS" -j $SLURM_JOB_ID |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment