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

Jonathan Perkins perkinjo at cse.ohio-state.edu
Thu Apr 14 20:17:05 EDT 2011


James is using mvapich-1.2rc1.  If he were to migrate to mvapich2-1.6
he'll be able to take advantage of this as well as other recent
enhancements.

On Thu, Apr 14, 2011 at 8:12 PM, Pavan Balaji <balaji at mcs.anl.gov> wrote:
> 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
>
>



-- 
Jonathan Perkins
http://www.cse.ohio-state.edu/~perkinjo



More information about the mvapich-discuss mailing list