Slurm supports parallel processing via message passing. To access OpenMPI, load the desired modules:
Example:
$ module load openmpi
$ mpicc myprogram.c
|
And include a request for multiple processes in the submit script:
#! /bin/bash
#SBATCH --job-name="MyMPIJob"
#SBATCH --partition=Centaurus
#SBATCH --nodes=4
#SBATCH --ntasks-per-node=4
#SBATCH --time=00:01:00
module load openmpi/4.0.3
srun --mpi=pmix_v3 /users/
and submit with sbatch:
$ sbatch my_script.sh
|
The Slurm options may also be set on the sbatch command line as follows
$ sbatch --job-name=MyMPIJob --partition=Centaurus --nodes=4 --ntasks-per-node=4 my_script.sh |
In this example, the resource request is for 4 cores (or processes) on each of 4 compute nodes for a total of 16 processes.Reference: Under topic "PARALLEL PROCESSING WITH OPENMPI" https://oneit.charlotte.edu/urc/educational-clusters/centaurus-user-notes