On 01/27/2014 08:14 AM, Christoph Niethammer wrote:
> I am maintaining several Open MPI installations from the 1.6 and 1.7 series and different compilers.
> Open MPI is build with torque support and shared and static bindings.
> Different Torque installations are present and managed via the modules environment.
> Would it be possible to switch the torque version by modification of PATH and LD_LIBRARY_PATH or will I have to face problems in this case?
> Grepping through the Open MPI installations for torque used during installation gave me some hits in binaries like mpirun or the static libs.
> I would appreciate any hints.
> Best regards
> Christoph Niethammer
> users mailing list
We (and a lot of people out there) keep several OpenMPI (OMPI)
builds from different OMPI versions and using different compilers.
We also build them with Torque support.
As you noticed, the main issue is to keep a clean environment setup,
because mixing those versions up at compilation time and/or run time
is likely/sure to cause trouble.
A very effective way to switch environment variables is to use the
"Environment Modules" package, which we do use here:
You can find it as RPM or equivalent package in most Linux distributions.
However, this takes some administrative work, as you need to write
a "module file" (in a dialect of Tcl/Tk) for each compiler,
each OMPI build, etc.
Some compilers (PGI, Intel) even provide some template environment
modules in their distribution.
I think using environment modules pays off if you have
many different environments to deal with, many users, etc.
If your cluster is small, or if you can setup the environment for
each user, this could be done by setting up consistent PATH and
LD_LIBRARY_PATH for your OMPI installations (and for the respective
compilers) for each user in their initialization files (.bashrc,
.tcshrc, etc). This is less flexible, and more error-prone,
as it requires editing the
intialization files every time you want to change the environment,
but also works.
I hope this helps,