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

Don't export the user's environment to the job #159

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Don't export the user's environment to the job #159

wants to merge 2 commits into from

Conversation

bartvm
Copy link

@bartvm bartvm commented Feb 7, 2017

Fixes #157.

Currently the user's entire environment is exported. This is bad
practice because it makes jobs hard to reproduce and debug, and in some
cases it can even cause errors. The only variable that needs to be
exported is PBS_FILENAME, which is used by the auto-resume script.

Currently the user's entire environment is exported. This is bad
practice because it makes jobs hard to reproduce and debug, and in some
cases it can even cause errors. The only variable that needs to be
exported is `PBS_FILENAME`, which is used by the auto-resume script.
@coveralls
Copy link

Coverage Status

Coverage remained the same at 94.532% when pulling 2042df3 on bartvm:master into c94f08e on SMART-Lab:master.

@bartvm
Copy link
Author

bartvm commented Feb 10, 2017

@mgermain Test away.

@bartvm
Copy link
Author

bartvm commented Feb 17, 2017

@mgermain Ping.

@mgermain
Copy link
Member

@bartvm working on one cluster, not working on the other. Haven't had the time to investigate why yet.

@bartvm
Copy link
Author

bartvm commented Feb 17, 2017

Do you get an error? Or does it just not restart?

@mgermain
Copy link
Member

Without the -V on Mammouth some part of the environment is not loaded.

@bartvm
Copy link
Author

bartvm commented Feb 22, 2017

That's the entire point of the flag, no? But smart-dispatch shouldn't rely on the environment as set outside of the job. What environment variable does it try to access?

@mgermain
Copy link
Member

No, the point of the flag is to not copy the current environment.
Your system still has to load the environment of the user in the job. It does on Helios and it does it weirdly and partially on mp2.

It does not try to access anything, I just saw that some modules are missing when -V is used. I have to investigate why.

@bartvm
Copy link
Author

bartvm commented Feb 23, 2017

That sounds weird... -V shouldn't affect at all how the job's environment is set up beyond not importing environment variables from the launch environment. It's possible that Mammouth doesn't load .bashrc at the beginning of a job. But in that case it's better to source .bashrc explicitly in the generated PBS file, instead of relying on exporting with -V IMO.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants