Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

One change in the new Slurm version impacts all batch jobs setting the number of OMP threads with directive:

Code Block
languagebash
themeConfluence
#SBATCH --cpus-per-task

...

Atos HPC users need to adjust the jobs script by exporting SRUN_CPUS_PER_TASK environmental variable manually:

bash
Code Block
language
export SRUN_CPUS_PER_TASK=${SLURM_CPUS_PER_TASK:-1}

or alternatively by specifying number of OMP threads as an option with "srun" command:

bash
Code Block
language
srun --cpus-per-task


To reduce user impact and made old job scripts compatible with the new Slurm, HPC support team has set SRUN_CPUS_PER_TASK environmental variable :

bash
Code Block
language
export SRUN_CPUS_PER_TASK=${SLURM_CPUS_PER_TASK:-1}

in the user profile. However, user profile is automatically loaded only in batch jobs (jobs with first line):

bash
Code Block
language
#!/bin/bash

In ksh, sh, and any other job type user profile needs to be sourced manually in the script to benefit from the patch created by the HPC support team:

bash
Code Block
language
. /etc/profile



${SLURM_CPUS_PER_TASK:

...