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: Sat, 3 Feb 2001 17:00:50 -0500 (EST)


On Fri, 2 Feb 2001, John W. Eaton wrote:
> On  2-Feb-2001, Alex Verstak <address@hidden> wrote:
> | I cannot give you an example, but I can explain why they wrote
> | it in the standard this way.  MPI/C is a low-level API for a
> | low-level language, so this requirement is not unreasonable.
> 
> I think it is, unless you can explain what good purpose it serves to
> *require* that the MPI_Init function must receive exactly the same
> argv/argc that main() sees.

I think it's their way of saying that the arguments are not
standardized.  Keep in mind, MPI only standardizes the API, not
the mechanisms for executing parallel programs.  The latter are
still a research topic.  Command-line arguments are in the fuzzy
land in-between the API and program execution, so they left this
hole open.

> The great thing about standards is that there are so many to choose
> from.  Why tolerate stupid ones?

All things considered, my choice is MPI.  It's the only API that
runs on all clusters around here.  Clusters come and go, but the
software stays.  Most vendors support MPI out-of-the-box, it can
be installed without administrative privileges on a bunch of
workstations, is very simple to use, etc.  The little argv quirk
worries me a lot less than the effort required to switch to a
different library.

> | I already explained how MPICH uses this feature.
> 
> How?  What would break if it didn't get the exact same argv/argc that
> main() sees (but still did receive arguments that are useful to it)?

Nothing would break, but the arguments depend on the particular
MPI implementation.  MPICH even uses different arguments on
different platforms.

This discussion is getting nowhere.  There are a couple of
solutions, please pick one or suggest your own.

1. Add a switch that makes Octave ignore the arguments it doesn't
understand.  This only works if MPI arguments are different from
Octave arguments.  MPI bindings will then be in an .oct file.  No
linking of Octave with MPI libraries is necessary.

2. Have two versions of Octave executable: one with MPI that calls
MPI_Init/Finalize, and one without MPI.  Add --with-mpi to configure
and make it detect an MPI installation (just check for mpiCC program).
Don't build mpi-octave unless MPI is installed.

3. Make Octave execute a .rc file before any arguments are processed,
and then process Octave's builtin argv intead of the argv passed to
main().  Users would then be able to add initialization calls for MPI,
X, Gtk, and other libraries that mess with arguments.  Linking with
these libraries is not necessary; the dynamic loader will pick them
up from .oct files.  This is the most general solution, but yet
another .rc file may be confusing.  A .rc that calls the destructors
makes sense too.

Suggestions?  I'll code up whichever one you pick, but I need to be
sure that you will accept the patches.

=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]