On Thu 2008-10-16 07:43, Jeff Squyres wrote: > On Oct 16, 2008, at 6:29 AM, Jed Brown wrote: > > Open MPI doesn't require undef'ing of anything. It should also not > require any special ordering of include files. Specifically, the > following codes both compile fine for me with 1.2.8 and the OMPI SVN > trunk (which is what I assume you mean by "-dev"?):
That's what I meant. This, works with 1.2.7 but not with -dev: #include <iostream> #undef SEEK_SET #undef SEEK_CUR #undef SEEK_END #include <mpi.h> If iostream is replaced by stdio, then both fail. > This is actually a problem in the MPI-2 spec; the names "MPI::SEEK_SET" > (and friends) were unfortunately chosen poorly. Hopefully that'll be > fixed relatively soon, in MPI-2.2. It wasn't addressed in the MPI-2.1 spec I was reading, hence my confusion. When namespaces and macros don't play well. > MPICH chose to handle this situation a different way than we did, and > apparently requires that you either #undef something or you #define an > MPICH-specific macro. I guess the portable way might be to just always > define that MPICH-specific macro. It should be harmless for OMPI. I'll go with this, thanks. > FWIW, I was chatting with the MPICH developers at the recent MPI Forum > meeting and showed them how we did our SEEK_* solution in Open MPI. Certainly the OMPI solution is better for users. Jed
pgpnUCoTagZ3S.pgp
Description: PGP signature