ensure $TMPDIR is set to a short path for OpenMPI v2.x#2311
Merged
wpoely86 merged 7 commits intoeasybuilders:developfrom Sep 24, 2017
Merged
ensure $TMPDIR is set to a short path for OpenMPI v2.x#2311wpoely86 merged 7 commits intoeasybuilders:developfrom
wpoely86 merged 7 commits intoeasybuilders:developfrom
Conversation
wpoely86
reviewed
Sep 20, 2017
| ompi_ver = self.get_software_version(self.MPI_MODULE_NAME)[0] | ||
| if LooseVersion(ompi_ver) >= LooseVersion('2.0') and LooseVersion(ompi_ver) < LooseVersion('3.0'): | ||
| if len(self.orig_tmpdir) > 50: | ||
| env.setvar('TMPDIR', tempfile.mkdtemp(prefix='/tmp/')) |
Member
There was a problem hiding this comment.
are you really sure that's a good idea? I would alert the user and let them handle it?
Member
Author
There was a problem hiding this comment.
I don't see why this wouldn't be a good idea, since this is exactly the recommendation OpenMPI makes (set $TMPDIR to /tmp).
At least we're setting it to a unique subdirectory in /tmp...
Are you worried about the hardcoding of /tmp?
wpoely86
previously approved these changes
Sep 22, 2017
…tatement to redefine $EBVERSIONOPENMPI
… by unloading previously loaded modules
wpoely86
approved these changes
Sep 24, 2017
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.
If
$TMPDIRis set to a long path, OpenMPI 2.x fails with an error like:See also https://www.open-mpi.org/faq/?category=osx#startup-errors-with-open-mpi-2.0.x.
This can occur on macOS, where the default temporary directory is something weird like
/var/folders/mg/q0_5yv791yz65cdnbglcqjvc0000gp/Trather than the more usual/tmp, but also in a job environment where$TMPDIRis set to a pre-created temporary directory that is specific to the job, e.g./local/305822[5092].master21.swalot.gent.vscfor an array job in Torque (which EasyBuild garbles intolocal/305822X5092X.master21.swalot.gent.vscto avoid using square brackets in the path name.To ensure that OpenMPI 2.x doesn't go down on its knees because of this when installing software with EasyBuild (usually because some tests are run using
mpirun), we can ensure that the$TMPDIRvalue is something short.