#! /bin/sh #SBATCH --ntasks=50 #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 # Hand the python script to Slurm to run, each task on its own cpu, and wait for them to complete: srun --overlap -o results/ising-%j-%2t.out -e results/ising-%j-%2t.err ./ising.py wait