分类:
2010-09-15 16:09:46
Some users may get error messages such as
SEEK_SET is #defined but must not be for the C++ binding of MPI
The problem is that both stdio.h and the MPI C++ interface use SEEK_SET, SEEK_CUR, and SEEK_END. This is really a bug in the MPI-2 standard. You can try adding
#undef SEEK_SET
#undef SEEK_END
#undef SEEK_CUR
before mpi.h is included, or add the definition
-DMPICH_IGNORE_CXX_SEEK
to the command line (this will cause the MPI versions of SEEK_SET etc. to be skipped).
最简单的方法是在Makefile里的这一行加上:
CXXFLAGS = -DMPICH_IGNORE_CXX_SEEK
编译就可以通过了