Newsgroups: comp.parallel.mpi
From: James Cownie <jcownie@dolphinics.com>
Subject: Re: env-variables & mpich
Organization: Dolphin Toolworks
Date: Fri, 05 Jun 1998 10:36:36 +0100
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-ID: <3577BC24.5A27@dolphinics.com>

Manfred Krafczyk wrote:
> 
> Hi all,
> I wonder if there is a way that an executable started via
> mpirun -np n executablename
> can read the same environment variables that were present
> in the shell were mpirun was started.
> Thanks for any hints
> 
> Manfred Krafczyk

MPICH (ch_p4) generally uses rsh to start the remote processes.
rsh doesn't pass the environment over. 

Assuming that you do have a process on the machine you started from
which can see the envirables you want, then the best thing to do 
is read them there and then use MPI_Broadcast to pass them to everyone
else. (If you really wanted it wouldn't be that hard to read all
the envirables and pas them all over, of course, but I expect that
you actually know what you're looking for, so need only pass that).

-- Jim 

James Cownie			<jcownie@dolphinics.com>
Dolphin Interconnect Solutions  +44 117 9071438
http://www.dolphinics.com/toolworks

