Re: Chapter 7

Anthony Skjellum (tony@Aurora.CS.MsState.Edu)
Tue, 28 May 1996 16:28:45 -0500 (CDT)

On Tue, 28 May 1996 Andrew.Lumsdaine@nd.edu wrote:

> Date: Tue, 28 May 1996 10:45:56 -0500 (EST)
> From: Andrew.Lumsdaine@nd.edu
> To: tony@aurora.cs.msstate.edu
> Cc: mpi-bind@mcs.anl.gov, mpi-core@mcs.anl.gov
> Subject: Re: Chapter 7
>
>
> In our last exciting episode Anthony Skjellum wrote:
>
> > The issue is implicitly mixed language programming between C and C++.
> > If one were only talking C++, then presumably, one would not care
> > about the C binding. You should require the use of the C++ binding
> > only.
>
> This is not possible in the real world. Consider a C++ programmer
> wanting to use Petsc (for instance).

This is true if there are to be C libraries that are using MPI. That
is not true of all C++ parallel programs. If a price must be paid for
all C++ parallel programs to support this capability, that should be
made apparent.

>
> > To get compatibility...
>
> > The object MPI could be the name space for all MPI-related stuff.
> > MPI.whatever or MPI->whatever ... then, it could co-exist with
> > the C name space, and interactions between the class form, and the C
> > form would have to be done with global functions.
>
> I don't understand this suggestion. The proposed C++ bindings use
> MPI_Comm, MPI_Group, etc., as the classes. Are you suggesting to
> instead use a single class named "MPI"? This seems to contradict your
> later suggestion about design for inheritance/reuse.
>
I offered a suggestion to help with the name space problem as an alt.
to above. Someone else said something like that too.

MPI as a singleton class can hide all the names. Then

MPI::Comm could be a base class as before. One just uses the prefix
to get the avoidance of conflict. Then, in the STL style, all the
types inside the MPI singleton class are used as MPI::Group, MPI::Op, etc.

-Tony

>
> > Rules for C/C++ interchange (just like between C and Fortran) must be
> > worked out.
>
> I think the C/C++ interchange issue is different than the C/Fortran
> issue. For one thing, since C and C++ are so intimately related (in
> particular, C is a proper subset of C++), the C and C++ bindings
> should inter-operate in like fashion.
>
> I think Jim Cownie's suggestion of giving the objects different names
> so that there is no conflict with the C name space solves all the
> inter-operability problems and seems not to introduce any new ones.
>
>
> Best Wishes,
> Andrew Lumsdaine
>

Anthony Skjellum, PhD, Asst. Professor of Computer Science;
Mississippi State University, Department of Computer Science & NSF ERC
Butler, Rm 300, PO Box 9637, Corner of Perry&Barr, Mississippi State,MS 39762
(601)325-8435 FAX: (601)325-8997; http://www.erc.msstate.edu/~tony; Quote:
"What a rain of ashes falls on him that sees the new and cannot leave the
old."-Shakespeare ; e-mail: tony@cs.msstate.edu; Try MPI!