Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Explain how SLURM variables work #24

Open
AdrienLeGuillou opened this issue Mar 29, 2023 · 0 comments
Open

Explain how SLURM variables work #24

AdrienLeGuillou opened this issue Mar 29, 2023 · 0 comments
Labels
documentation Improvements or additions to documentation

Comments

@AdrienLeGuillou
Copy link
Member

AdrienLeGuillou commented Mar 29, 2023

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

@AdrienLeGuillou AdrienLeGuillou added the documentation Improvements or additions to documentation label Apr 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

1 participant