Skip to content

restore tweaked $TMPDIR value after loading module (for sanity check)#2498

Merged
wpoely86 merged 2 commits intoeasybuilders:developfrom
boegel:tweaked_TMPDIR
May 7, 2018
Merged

restore tweaked $TMPDIR value after loading module (for sanity check)#2498
wpoely86 merged 2 commits intoeasybuilders:developfrom
boegel:tweaked_TMPDIR

Conversation

@boegel
Copy link
Copy Markdown
Member

@boegel boegel commented May 4, 2018

We have some logic in easybuild/toolchains/mpi/openmpi.py to tweak the value of $TMPDIR to 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 Rmpi extension in R.

This change fixes this, by restoring (only) a tweaked value of $TMPDIR after loading the generated module for the sanity check.

Comment thread test/framework/easyblock.py Outdated

self.modtool.use(tmp_modules)

orig_tmpdir = os.environ.get('TMPDIR')
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

are you sure the TMPDIR will be long enough to trigger this?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

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)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

don't you need to reset TMPDIR too at the end of this test?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

No, the environment is reset/restored for every test to isolate them from each other.

@wpoely86 wpoely86 merged commit 3ea671b into easybuilders:develop May 7, 2018
@boegel boegel deleted the tweaked_TMPDIR branch May 7, 2018 12:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants