This version is outdated by a newer approved version.This version (2019/03/12 12:47) is a draft.
Approvals: 0/1
Approvals: 0/1
This is an old revision of the document!
Running multiple mpi jobs concurrently
Sample job script to run two MPI tasks within one job script concurrently:
With srun:
#!/bin/bash #SBATCH -J test #SBATCH -N 1 #SBATCH --ntasks-per-core=1 #SBATCH --ntasks-per-node=2 export SLURM_STEP_GRES=none module load intel/18 intel-mpi/2018 for i in 0 8 do j=$(($i+1)) srun -n 2 --cpu_bind=map_cpu:$i,$j ./hello_world_intelmpi2018 & done wait exit 0
With mpirun (Intel MPI):
#!/bin/bash #SBATCH -J test #SBATCH -N 1 #SBATCH --ntasks-per-core=1 #SBATCH --ntasks-per-node=2 export SLURM_STEP_GRES=none module load intel/18 intel-mpi/2018 for i in 0 8 do j=$(($i+1)) mpirun -env I_MPI_PIN_PROCESSOR_LIST $i,$j -np 2 ./hello_world_intelmpi2018 & done wait exit 0
You can download the C code example here: