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.