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
Let's consider that I have cluster with two nodes (n001 and n002) and I want
to set the environment variable GMON_OUT_PREFIX with different value on each
I would like to set this variable with the following form :
*nicolas_at_n001 % setenv GMON_OUT_PREFIX 'gmon.out_'`/bin/uname -n`
nicolas_at_n001 % echo $GMON_OUT_PREFIX
my mpirun command looks like :
*nicolas_at_n001 % cat CLUSTER_NODES
nicolas_at_n001 % mpirun -np 2 --bynode --hostfile CLUSTER_NODES myexe*
I would like to export the GMON_OUT_PREFIX environment variable in order to
have « gmon.out_n001 » on first node and « gmon.out_n002 » on second one.
I cannot use '-x' option of mpirun command since it is only use to export
(not set) variable.
MPI executable is running on cluster nodes where HOME directory is not
mounted such that I cannot use ~/.cshrc file.
Is there another way to do it?