Open MPI logo

Open MPI User's Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Open MPI User's mailing list

Subject: Re: [OMPI users] intel compiler linking issue and issue of environment variable on remote node, with open mpi 1.4.3
From: Jeff Squyres (jsquyres_at_[hidden])
Date: 2011-03-24 21:19:22

On Mar 24, 2011, at 2:45 PM, yanyg_at_[hidden] wrote:

> Thanks for your information. For my Open MPI installation, actually
> the executables such as mpirun and orted are dependent on those
> dynamic intel libraries, when I use ldd on mpirun, some dynamic
> libraries show up. I am trying to make these open mpi executables
> statically linked with these intel libraries, but it shows no progress
> even if I use "--with-gnu-ld" with specific static intel libraries set in
> LIBS when I configure open mpi 1.4.3 installation. It seems there
> are something for the compiling process of open mpi 1.4.3 that I do
> not have control, or I just missed something. I will try different
> things, and will report here once I have a confirmative conclusion.
> However, any hints or information on how to make open mpi
> executables statically linked to intel libs through intel compilers are
> very welcomed. Thanks!

I have a dim recollection of some intel compiler command line flag that says "staticially link in the intel libraries". -Bstatic-intel, or something like that...? Googling around and/or checking the icc docs would probably reveal the true name of this option. Pass it in to configure via LDFLAGS, like this:

./configure LDFLAGS=-Bstatic-intel ...other-configure-options...

Also, as Mac noted, if you --disable-shared / --enable-static, then all of OMPI s built statically with no shared libraries, which should (as Mac confirms) also remove the dependency at run time on the intel shared libraries.

> As for the issue that environment variables set in a script do not
> propagate to remote slave nodes, I use rsh connection for
> simplicity. If I set PATH and LD_LIBRARY_PATH in ~/.bashrc
> (which shared by all nodes, master or slave), my MPI application
> does work as expected, and this confirms Ralph's suggestions.
> The thing is that I just want to avoid set the environment variables in
> .bashrc or .porfile file, but instead, set them in the script, and want
> these environment variables propagating to other slave nodes
> when I do mpirun, as I could do for MPICH. I also try use the prefix
> path before mpirun when I do mpirun, as suggested by Jeff, it does
> not work either. Any hints to solve this issue?

The prefix method for Open MPI will set the PATH and LD_LIBRARY_PATH on remote nodes only; it won't propagate arbitrary environment variables to the remote nodes.

For propagating arbitrary environment variables, use mpirun's -x option. See mpirun(1). Let us know if that works for you.

Jeff Squyres
For corporate legal information go to: