Open MPI logo

Open MPI Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Development mailing list

Subject: Re: [OMPI devel] Fortran 90 Interface
From: Jeff Squyres (jsquyres_at_[hidden])
Date: 2009-01-23 11:42:00

On Jan 23, 2009, at 10:07 AM, N.M. Maclaren wrote:

>> I'm assuming what you're really referring to is the fact that there
>> is no currently binary compatibility between different MPI
>> implementations (forgive me if my assumption is wrong). ...
> Good Lord, no!!!!! You don't know me, but that's NOT the sort of
> thing
> I would refer to.


FWIW, ABI is not necessarily a bad thing; it has its benefits and
drawbacks (and enablers and limitations). Some people want it and
some people don't (most don't care, I think). We'll see where that
effort goes in the Forum and elsewhere.

> The reason is that it is extremely likely to be supplied by an
> incorrect
> program (e.g. by passing an uninitialised integer that should have
> been
> set to MPI_COMM_WORLD). When such a program is ported elsewhere (or
> even
> when a new version of a compile moves code around), a program that has
> been 'working' for ages breaks.
> I could give you some amusing stories of the contents of location
> zero,
> and how bitterly the owners of one system regretted having architected
> that page zero was a page of zeroes, a decade down the line :-)

Ah -- I actually thought that *wouldn't* be much of a problem for
Fortran since the array indexing started at 1.

OMPI's Fortran MPI handles are literally indexes into a densely-packed
array in C, so we do start with 0 and go upwards. Not much we can do
about that at this point. Well, to be truthful, we *could* change
that -- say by adding some arbitrary value to every Fortran integer
(e.g., make them negative, or add 20, or whatever). But that would
end up touching quite a bit of code in OMPI.

FWIW, the F03 bindings for MPI may allow address-sized integers to be
handles in Fortran. In this case, MPI handles will likely take on
exactly the same value that they are in C. In OMPI's case, that's a C
pointer, so the F03 value for MPI_COMM_WORLD will be some very large
non-zero integer value. (standard disclaimers about future features/
functionality -- time will tell if this stuff plays out as expected)

I see your point about accidental 0's, but I think I'd prefer that the
F03 bindings solve this particular issue.

Jeff Squyres
Cisco Systems