slurm

Slurm OpenMP Examples

Slurm OpenMP Examples

This example shows a 48 core OpenMP Job (maximum size for one node on Abisko).

    #!/bin/bash
    # Example with 48 cores for OpenMP
    #
    # Project/Account
    #SBATCH -A hpc2n-1234-56
    #
    # 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

SLURM commands and information

SLURM commands and information

There are many more commands than the ones we have chosen to look at below, but they are the most commonly used ones. You can find more information on the SLURM homepage: SLURM documentation

You can run programs either by giving all the commands on the command line or by submitting a job script. If you ask for the resources on the command line, you will wait for the program to run before you can use the window again (unless you can send it to the background with &).

Updated: 2017-11-22, 19:57