Last active
August 7, 2023 13:03
-
-
Save willirath/abac67bf95d29afb0969ced047b539f7 to your computer and use it in GitHub Desktop.
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
#!/usr/bin/env bash | |
#SBATCH --job-name=high_throughput | |
#SBATCH --ntasks=13 # number of tasks running at the same time | |
#SBATCH --cpus-per-task=1 | |
#SBATCH --mem-per-cpu=12G | |
#SBATCH --time=1:00:00 # one hour | |
#SBATCH --partition=cluster | |
#SBATCH --output=high_throughput.out | |
#SBATCH --error=high_throughput.err | |
#SBATCH [email protected] | |
#SBATCH --mail-type=ALL | |
for mytask in {001..300}; do # this will submit 300 tasks of which 13 will run at the same time | |
export mytask | |
srun --ntasks=1 --exclusive bash -c 'DELAY=$((RANDOM % 12)); sleep $DELAY; echo $mytask took $DELAY seconds;' & | |
done | |
wait | |
jobinf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment