Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

In this example we ask for 8 tasks, 2 SKL nodes and 1 hour of wallclock time, and runs an MPI application (myprogram) compiled with the intel compiler and the mpi library. The input data are in file "myinput", the output file is "myoutput", the working directory is where the job was submitted from. Through “–cpus-per-task=1” istruction each task will bind 1 physical cpu (core). On these nodes if the number of the used cores per node is < of the number of cores per node (=48) you have to specify the srun option “--cpu-bind=coresto ensure the correct binding between tasks and coresThis is a default option.

############# A3 Skylake #############
#!/bin/bash
#SBATCH --time=01:00:00

#SBATCH --nodes=2
#SBATCH --ntasks-per-node=4
#SBATCH --ntasks-per-socket=2
#SBATCH --cpus-per-task=1 #SBATCH --mem=182000 <mem_per_node>
#SBATCH --partition=<partion_name> #SBATCH --qos=<qos_name> #SBATCH --job-name=jobMPI #SBATCH --err=myJob.err #SBATCH --out=myJob.out #SBATCH --account=<account_no>

module load intel intelmpi srun --cpu-bind=cores myprogram < myinput > myoutput
##################################

For SKL users an useful option may be to consider --cpu-bind=cores when the number of tasks requested is less than 48 cores per node. More details can be found at this page.

OpenMP job script

For a typical OpenMPI job you can take one the following scripts as a template, and modify it depending on your needs.

...