-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add an "MPI personality" for OpenMPI that sets LD_LIBRARY_PATH to find Flux libpmi2.so.
- Loading branch information
Showing
2 changed files
with
33 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
-- Set environment specific to openmpi | ||
-- | ||
-- If configured for SLURM, OpenMPI links with libpmi.so or libpmi2.so | ||
-- (depending on options used). Flux provides alternate versions of these | ||
-- libraries in a non-default location, and we must set LD_LIBRARY_PATH to | ||
-- point there. | ||
-- | ||
-- Some versions of OpenMPI, 1.10.2 for example, set an rpath for their | ||
-- PMI plugins that includes /usr/lib64. That is bug and those versions | ||
-- need to be patched patched to work with Flux. | ||
-- | ||
-- If Flux supports the PMI-2 wire protocol, the SLURM libpmi.so might | ||
-- work with Flux. It currently doesn't, and in fact ignores the protocol | ||
-- version handshake entirely. (See flux-framework/flux-core#746) | ||
|
||
|
||
local dirname = require 'flux.posix'.dirname | ||
|
||
function rexecd_init () | ||
local env = wreck.environ | ||
local f = wreck.flux | ||
local libpmi = f:getattr ('conf.pmi_library_path') | ||
local ldpath = dirname (libpmi) | ||
|
||
if (env['LD_LIBRARY_PATH'] ~= nil) then | ||
ldpath = ldpath..':'..env['LD_LIBRARY_PATH'] | ||
end | ||
env['LD_LIBRARY_PATH'] = ldpath | ||
end | ||
|
||
-- vi: ts=4 sw=4 expandtab |