openmp

Slurm OpenMP Examples

Slurm OpenMP Examples

This example shows a 28 core OpenMP Job (maximum size for one normal node on Kebnekaise).

#!/bin/bash
# Example with 28 cores for OpenMP
#
# Project/Account
#SBATCH -A hpc2n-1234-56
#
# Number of cores
#SBATCH -c 28
#
# Runtime of this jobs is less then 12 hours.
#SBATCH --time=12:00:00
#

# Clear the environment from any previously loaded modules
module purge > /dev/null 2>&1

# Load the module environment suitable for the job
module load foss/2019a
​
# Set OMP_NUM_THREADS to the same value as -c
# with a fallback in case it isn't set.
Updated: 2024-04-17, 14:47