[mvapich-discuss] mpirun won't pass environment variables?
James R. Leek
leek2 at llnl.gov
Thu Apr 14 18:08:13 EDT 2011
I'm using my own mvapich-1.2rc1 installation on a machine running
PBSPro. (I had to build mvapich myself because the supported MPI on the
system is OpenMPI, which does not support launching an MPI job from an
MPI job.)
My program needs to check some environment variables to run correctly,
but mpirun is not passing on any environment variables. For example, I
have a program that uses getenv to check the environment for
"COOP_name", then prints it out.
--------------------
[leek2 mpitest]$ export COOP_name=foo
[leek2 mpitest]$ mpirun mpi-helloworld
COOP_name: (null)
--------------------
COOP_name didn't make it into the environment of the child process. The
user guide tells me this should work:
-----------------
[leek2 at m0069 mpitest]$ mpirun COOP_name=hey mpi-helloworld
which: no COOP_name=hey in ($PATH)
Unrecognized argument: COOP_name=hey
If this is an executable, perhaps you need to list the full path.
----------------------
but obviously it doesn't.
Does anyone know how to get mpirun to pass on the environment variables?
--
Jim Leek
leek2 at llnl.gov
More information about the mvapich-discuss
mailing list