#! /bin/sh #SBATCH --ntasks=15 #SBATCH --output ising-%j.out #SBATCH --error ising-%j.err # Check for the results directory, and if it isn't present, create it: if [[ ! -d 'results' ]]; then mkdir 'results'; fi for i in {0..15} do # Calculate the actual parameters using the index i, by running python inside ` `: s=`python -c "print($i*0.1)"` # 0...1.5 srun --overlap -N 1 -n 1 -o results/ising-%j-$i.out -e results/ising-%j-$i.err ./ising.py $s & done wait