hybrid example

Slurm MPI + OpenMP examples

Slurm MPI + OpenMP examples

This example shows a hybrid MPI/OpenMP job with 4 tasks and 48 cores per task, on Abisko.

#!/bin/bash
# Example with 4 tasks and 48 cores per task for MPI+OpenMP
#
# Project/Account
#SBATCH -A hpc2n-1234-56
#
# Number of MPI tasks
#SBATCH -n 4
#
# Number of cores per task
#SBATCH -c 48
#
# Runtime of this jobs is less then 12 hours.
#SBATCH --time=12:00:00
#

# Set OMP_NUM_THREADS to the same value as -c
# with a fallback in case it isn't set.
# SLURM_CPUS_PER_TASK is set to the value of -c, but only if -c is explicitly set
Updated: 2017-12-14, 12:27