From: lindahl@cs.virginia.edu (Greg Lindahl)
Newsgroups: comp.parallel.mpi
Subject: Re: Environment variables under MPI()?
Date: 24 Aug 1998 19:21:21 GMT
Organization: a guest of Shadow Island Games
Message-Id: <6rsefh$a7l@news1.newsguy.com>
References: <35E1994A.794B@dao.gsfc.nasa.gov>


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

> > 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. 
> 
> I have to argue that using Unix environment may be the _only_ elegant 
> and portable way to have a handle on per-run user-configurable 
> parameters for a software development system.

I would agree that it is an elegant possibility. But I can't imagine
that you can get MPI vendors to agree on it as a quality of
implementation issue. After all, it's not easy to write a simple
program using vanilla send/recv that will not deadlock due to lack of
buffers on at least one important vendor MPI implementation!

And we won't even mention portability to other OSes.

If we did mention portability to other OSes, then you should have no
trouble writing some generic routines which would transfer around
these variables and then would allow libraries to retrieve information.
This would involve one call at the start of you program to somehow
read information, and a call in every library. It would be portable
to other OSes and work with all existing Unix MPI implementations.

	CALL OUR_MPI_INITIALIZE_DB ! could come from env, **argv, file, etc

[...]

	CHARACTER*256 VALUE, MODULE, NAME
	VALUE = OUR_MPI_GET_DB_VALUE (MODULE, NAME)

this last call is similar to getenv()...

-- g

