Skip to content

Explain how SLURM variables work #24

@AdrienLeGuillou

Description

@AdrienLeGuillou

by default workflow steps use --export=NONE
this can be overridden in the sbatch_opts.

with --export=NONE, all SLURM_* vars are still passed.

note:

# in sh 
export ABC=10
export SLURM_ABC=20

# in sbatch
#SBATCH --export=NONE
echo $ABC               # gives ""
echo $SLURM_ABC # gives 20

# in sbatch
#SBATCH --export=ALL
echo $ABC               # gives 10
echo $SLURM_ABC # gives 20

# in sbatch
#SBATCH --export=ABC=30,SLURM_ABC=40
echo $ABC               # gives 30
echo $SLURM_ABC # gives 20

takeaway: SLURM_* cannot be overridden by --export, must actually be exported in the user ENV

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions