Skip to content

How to run a job

The main examples are for Cori KNL. Scripts for Edison and Cori Haswell are available from the dropdowns.

Running an OpenMP job

#!/bin/bash
#SBATCH -N 2
#SBATCH -C knl
#SBATCH -p debug
#SBATCH -t 00:05:00

#OpenMP settings:
export OMP_NUM_THREADS=4
export OMP_PLACES=threads
export OMP_PROC_BIND=spread

#run the application:
sbcast ./xthi /tmp/xthi
srun -n 34 -c 16 --cpu_bind=cores /tmp/xthi | sort
Edison
#!/bin/bash
#SBATCH -N 2
#SBATCH -p debug
#SBATCH -t 00:05:00

#OpenMP settings:
export OMP_NUM_THREADS=4
export OMP_PLACES=threads
export OMP_PROC_BIND=spread

#run the application:
sbcast ./xthi /tmp/xthi
srun -n 12 -c 8 --cpu_bind=cores /tmp/xthi | sort
Cori Haswell
#!/bin/bash
#SBATCH -N 2
#SBATCH -C haswell
#SBATCH -p debug
#SBATCH -t 00:05:00

#OpenMP settings:
export OMP_NUM_THREADS=4
export OMP_PLACES=threads
export OMP_PROC_BIND=spread

#run the application:
sbcast ./xthi /tmp/xthi
srun -n 16 -c 8 --cpu_bind=cores /tmp/xthi | sort