[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [mpi-21] ABI (was: Call for MPI 2.2 and 3.0...)
* Greg Lindahl <lindahl@xxxxxxx> [2007-12-06 11:57:11]:
> On Thu, Dec 06, 2007 at 11:30:43AM +0100, Dries Kimpe wrote:
> > One example of compile-time problems is the issue with SEEK_SET, SEEK_CUR,
> > SEEK_END and the MPI C++ bindings.
> Is this a place where MPI implementations are different? Yes, a bug in
> the standard, but no, not a source of unportability when moving to a
> different MPI implementation.
I agree it is a bug in the standard, but it IS actually a source of
unportability where a standard-compliant program (granted, a standard with
a bug) stops compiling when moving to a different MPI implementation.
(On the other hand, I tend to agree with Rajeev, and have the impression
that most of those portability problems are actually errors in the
application)
The following program is a standard-compliant program:
#include <iostream>
#include <mpi.h>
int main (int argc, char ** args)
{ MPI_Init (0,0); MPI_Finalize (); }
OpenMPI (using gcc 4.1.2 as base compiler) accepts and compiles it,
while mpich2-1.0.5p4 doesn't (unless you #define MPICH_IGNORE_CXX_SEEK)
You asked for more details about applications encountering problems moving
to other MPI implementations; well, this is one example.
Dries
PS. Reversing the #include order solves the problem, but this isn't always
easy to do when using libraries that might or might not include iostream
or mpi.