restore tweaked $TMPDIR value after loading module (for sanity check)#2498
Merged
wpoely86 merged 2 commits intoeasybuilders:developfrom May 7, 2018
Merged
restore tweaked $TMPDIR value after loading module (for sanity check)#2498wpoely86 merged 2 commits intoeasybuilders:developfrom
wpoely86 merged 2 commits intoeasybuilders:developfrom
Conversation
wpoely86
reviewed
May 4, 2018
|
|
||
| self.modtool.use(tmp_modules) | ||
|
|
||
| orig_tmpdir = os.environ.get('TMPDIR') |
Member
There was a problem hiding this comment.
are you sure the TMPDIR will be long enough to trigger this?
Member
Author
There was a problem hiding this comment.
Hmm, good point...
It seems that the default Travis environment indeed causes it to be long enough, otherwise the assertTrue on the warning would fail, but we better make sure the $TMPDIR value is long enough, I'll fix that, thanks.
|
|
||
| # cleanup | ||
| eb.close_log() | ||
| os.remove(eb.logfile) |
Member
There was a problem hiding this comment.
don't you need to reset TMPDIR too at the end of this test?
Member
Author
There was a problem hiding this comment.
No, the environment is reset/restored for every test to isolate them from each other.
… test_load_module
wpoely86
approved these changes
May 7, 2018
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We have some logic in
easybuild/toolchains/mpi/openmpi.pyto tweak the value of$TMPDIRto a shorter path for OpenMPI 2.x, because long paths result in startup issues (cfr. https://www.open-mpi.org/faq/?category=osx#startup-errors-with-open-mpi-2.0.x).When loading the generated module, which is done during the sanity check, we currently don't restore this tweaked value however...
This can cause the sanity check to fail when MPI startup is triggered somehow, which occurs for example when testing the load of the
Rmpiextension inR.This change fixes this, by restoring (only) a tweaked value of
$TMPDIRafter loading the generated module for the sanity check.