Created
May 16, 2017 07:51
-
-
Save lkluft/27cc04a18b698a0e27c56da501b009e9 to your computer and use it in GitHub Desktop.
SLURM job dependency
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 | |
#SBATCH --job-name=main | |
#SBATCH --output=main-%j.out | |
#SBATCH --error=main-%j.err | |
#SBATCH --account=uni | |
#SBATCH --partition=uni-u237 | |
#SBATCH --nodes=1-1 | |
#SBATCH --ntasks=1 | |
#SBATCH --cpus-per-task=1 | |
cat current_date.txt && rm current_date.txt |
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 | |
#SBATCH --job-name=preprocessing | |
#SBATCH --output=preprocessing-%j.out | |
#SBATCH --error=preprocessing-%j.err | |
#SBATCH --account=uni | |
#SBATCH --partition=uni-u237 | |
#SBATCH --nodes=1-1 | |
#SBATCH --ntasks=1 | |
#SBATCH --cpus-per-task=1 | |
sleep 10 | |
date >> current_date.txt |
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 | |
# Catch return value but print it on STDOUT. | |
RET="$(sbatch pre.job)" && echo $RET | |
# Send main job to queue (dependent on previous JOB-ID). | |
sbatch --dependency=afterok:${RET##* } main.job |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment