[MOAB-dev] SEEK_SET again
Jed Brown
jed at 59A2.org
Thu Oct 22 02:01:46 CDT 2009
Jason Kraftcheck wrote:
> So, if we were to define MPICH_IGNORE_CXX_SEEK, will MOAB compile without
> encountering this naming conflict for all of the following MPI 2.0
> implementations?
> mpich
> mvapich
> intel
> Microsoft
> IBM
> Cray
> MX
> Open MPI
MPICH and Open MPI work out of the box, regardless of whether that is
defined. I don't know if the MPICH derivatives have their own names to
disable MPI::SEEK_* or if they respond to MPICH_IGNORE_CXX_SEEK.
I also noticed that the current hack does not do anything like what you
think it does (what the comments suggest) because macro expansion
doesn't work like that.
$ cat > broken.C
#include <stdio.h>
#include <MBParallelComm.hpp>
int main(void) {
printf("SEEK_SET = %d\n",SEEK_SET);
printf("MPI::SEEK_SET = %d\n",MPI::SEEK_SET);
return 0;
}
$ /opt/mpich2/bin/mpicxx -c -o broken -DUSE_MPI -I/home/jed/usr/mpich/include broken.C
broken.C: In function ‘int main()’:
broken.C:4: error: ‘SEEK_SET_OLD’ was not declared in this scope
broken.C:5: error: ‘SEEK_SET_OLD’ is not a member of ‘MPI’
So it's equivalent to just #undef'ing them, except with a confusing
error message.
Jed
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 261 bytes
Desc: OpenPGP digital signature
URL: <http://lists.mcs.anl.gov/pipermail/moab-dev/attachments/20091022/e8733f21/attachment.pgp>
More information about the moab-dev
mailing list