help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: MPI


From: Alex Verstak
Subject: Re: MPI
Date: Fri, 2 Feb 2001 18:59:37 -0500 (EST)


On Fri, 2 Feb 2001, John W. Eaton wrote:
> | It must be called with argc and argv passed to main() before
> | main() processes them (see MPI standard).  MPICH's mpirun(1),
> | for example, passes some startup information on the command
> | line.  MPI_Init strips it off before the application can
> | see it (similar to the way X libraries eat off --geometry
> | switches).
> 
> Is there any reason that the argv and argc that are passed to
> MPI_Init have to be the same ones that are passed to main?  Why can't
> you just create whatever argv/argc pair you need and pass that to
> MPI_Init?

A quote from the MPI Standard:
`An MPI implementation is free to require that the arguments in the C
binding must be the arguments to main.'

octave.cc will be very unhappy at line 502 if it sees the arguments
intended for MPI.  MPI arguments are not standardized, so you can't
just save them for MPI_Init later.  Worse, they can clash with octave's
own arguments.  It is only portable to call MPI_Init before the arguments
are processed.

That is, I can make the wrappers for a particular MPI implementation
without messing with octave's source, but it won't be portable.

> | Also, the version of MPICH I am using does not like it when
> | I return from the scope of the function that called MPI_Init.
> | It just forgets that it has been initialized.
> 
> Why?  It seems like a very bad restriction that the initializatio
> function for some library would *have* to be called from the one true
> main().

Forget it, my bad.  I wasn't linking it correctly.

=alex



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]