[mvapich-discuss] mpirun won't pass environment variables?

Pavan Balaji balaji at mcs.anl.gov
Thu Apr 14 20:12:16 EDT 2011


Jonathan,

Is mpirun from Hydra? If yes, the first case given by James should work:

% export FOO=1
% mpiexec -np 1 env | grep FOO
FOO=1

The following methods work too:

% FOO=1 mpiexec -np 1 env | grep FOO
FOO=1

% mpiexec -env FOO=1 -np 1 env | grep FOO
FOO=1

% mpiexec -genv FOO=1 -np 1 env | grep FOO
FOO=1

  -- Pavan

On 04/14/2011 06:26 PM, James R. Leek wrote:
> On 04/14/2011 04:00 PM, Jonathan Perkins wrote:
>> Please try using mpirun_rsh instead of mpirun.
>>
>> You can find more information on this at:
>> http://mvapich.cse.ohio-state.edu/support/mvapich_user_guide-1.2rc1.html#x1-180005.2
>>
> OK, that still doesn't pass them on automatically, but it does work if I
> define the variables on the command line.
>
> [leek2 at m0011 mpitest]$ mpirun_rsh -ssh -np 2 -hostfile $PBS_NODEFILE
> mpi-helloworld
> Hello World from 1 m0011.mana!
> Hello World from 0 m0011.mana!
> COOP_name: (null)
> COOP_name: (null)
>
> [leek2 at m0011 mpitest]$ mpirun_rsh -ssh -np 2 -hostfile $PBS_NODEFILE
> COOP_name=hi mpi-helloworld
> Hello World from 1 m0011.mana!
> Hello World from 0 m0011.mana!
> COOP_name: hi
> COOP_name: hi
>
> I didn't realize mpirun_rsh was really any different.  If there any way
> to get them to pass automatically?
>

-- 
Pavan Balaji
http://www.mcs.anl.gov/~balaji


More information about the mvapich-discuss mailing list