Open MPI logo

Open MPI User's Mailing List Archives

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

Subject: Re: [OMPI users] defining different values for same environment variable
From: Matt Hughes ([hidden])
Date: 2009-02-27 12:46:16

2009/2/27 Nicolas Deladerriere <nicolas.deladerriere_at_[hidden]>:
> I am looking for a way to set environment variable with different value on
> each node before running MPI executable. (not only export the environment
> variable !)

I typically use a script for things like this. So instead of
specifying your executable directly on the mpirun command line,
instead specify the script. The script can set the environment
variable, then launch your executable.

setenv GMON_OUT_PREFIX 'gmon.out_'`/bin/uname -n`

mpirun -np 2 --bynode --hostfile CLUSTER_NODES myscript

I'm not sure if that csh syntax is right, but you get the idea.