Open MPI logo

Open MPI User's Mailing List Archives

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

Subject: Re: [OMPI users] MPIRUN + Environtment Variable
From: Eugene Loh (eugene.loh_at_[hidden])
Date: 2011-09-30 01:25:38


  On 09/29/11 20:54, Xin Tong wrote:
> I need to set up some environment variables before I run my
> application ( appA ). I am currently using mpirun -np 1 -host socrates
> (socrates is another machine) appA. Before appA runs, it expects
> some environment variables to be set up. How do i do that ?
% man mpirun
...
      To manage files and runtime environment:
...
      -x <env>
           Export the specified environment variables to the
           remote nodes before executing the program. Only one
           environment variable can be specified per -x option.
           Existing environment variables can be specified or new
           variable names specified with corresponding values.
           For example:
               % mpirun -x DISPLAY -x OFILE=/tmp/out ...

           The parser for the -x option is not very sophisticated;
           it does not even understand quoted values. Users are
           advised to set variables in the environment, and then
           use -x to export (not define) them.