Skip to content

don't pass down specific environment variables into submitted jobs#2643

Merged
akesandgren merged 1 commit intoeasybuilders:developfrom
boegel:job_env
Nov 1, 2018
Merged

don't pass down specific environment variables into submitted jobs#2643
akesandgren merged 1 commit intoeasybuilders:developfrom
boegel:job_env

Conversation

@boegel
Copy link
Copy Markdown
Member

@boegel boegel commented Nov 1, 2018

Strictly speaking, this change is not backward compatible, but based on the feedback in #2632 this is actually more of a bugfix rather than just a change in behavior...

The behavior with this change included basically corresponds EasyBuild versions prior to 3.7.0 (which were not compatible yet with GC3Pie 2.5.0), since with GC3Pie versions prior to 2.5.0 the environment variables that were specified were basically totally ignored (at least when submitting to SLURM). Am I getting that right @riccardomurri?

Currently, EasyBuild passes down all $EASYBUILD_* environment variables to ensure that the EasyBuild configuration in the submitted job is correct, but that's actually useless since the entire configuration is also passed down via command line options in the submitted job (which override the $EASYBUILD_* environment variables)...

Passing down of $PYTHONPATH & $MODULEPATH is an attempt to make sure that EasyBuild & loaded modules are passed down into the submitted job as well. That's a pretty broken attempt though... For EasyBuild itself, at least $PATH must be passed down too (cfr. #2632), and for loaded modules several other environment variables may be relevant as well.

So, it's better to simply not pass down anything at all, since this provides (in some sense) more control to the user of eb --job w.r.t. setting up the job environment (which can also be done via a .bashrc login script, for example).

cc @akesandgren

Copy link
Copy Markdown
Contributor

@akesandgren akesandgren left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM and testing with the new Slurm backend also show that leaving the environment alone is the best approach, since it actually works then.

Meant this as a review...

Copy link
Copy Markdown
Contributor

@akesandgren akesandgren left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@akesandgren akesandgren merged commit dca490f into easybuilders:develop Nov 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants