From: lindahl@cs.virginia.edu (Greg Lindahl)
Newsgroups: comp.parallel.mpi
Subject: Re: Environment variables under MPI()?
Date: 22 Aug 1998 03:19:06 GMT
Organization: a guest of Shadow Island Games
Message-Id: <6rldba$mlf@news1.newsguy.com>
References: <35DE20E3.2781@dao.gsfc.nasa.gov>


Jing Guo <guo@dao.gsfc.nasa.gov> writes:

> > Sure: write your own small piece of code to pass these variables
> > around at the start of your run.
> 
> It is the most frequent suggestion I heard before, but I didn't like it:
> 
>   a) It won't work if the implementation does not even have the 
>     _right_ values for the root processor.  (Yes, such implementation
>     does exist.)  I assume you were also talking about values defined
>     _externally_, not _internally_ by a program.

It is easy to write a program to write the Unix environment into a
file, and then have your MPI root program read this file and send its
contents to all the other nodes.

>   b) It might not be portable.  Since it is really an OS interface 
>     issue, it should not be determined unilaterary by a software  
>     developer.

It's a lot more portable than complaining that MPI implementations
should propagate the Unix environment!

>   c) Thinking you are given a communicator and expected to develop a
>     library working in that given world, I wonder my own small piece 
>     of code will ever work under that situation.

It is not a surprise that a library should need initialization in
order to run. It _is_ a surprise that you think the Unix environment
is the right place to put it. Given that the MPI standard doesn't even
really address access to conventional Fortran files, I think you are
expecting too much of the standard.

-- g

