job submission files

Slurm OpenMP Examples

Slurm OpenMP Examples

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

# 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.

Submit File Design

SLURM Submit File Design

To best use the resources with Slurm you need to have some basic information about the application you want to run.

Slurm will do its best to fit your job into the cluster, but you have to give it some hints of what you want it to do.

The parameters described below can be given directly as arguments to srun and sbatch.

If you don't give SLURM enough information, it will try to fit your job for best throughput (lowest possible queue time). This approach will not always give the best performance for your job.

Updated: 2024-05-14, 14:17