Issue
When compiling certain C++ applications using the Intel® MPI Library compilation driver mpiicpc, I encounter an error message that looks something like the following:
…Solution
/opt/intel/mpi/3.1/include/mpicxx.h(45): catastrophic error: #error directive: "SEEK_SET is #defined but must not be for the C++ binding of MPI"
#error "SEEK_SET is #defined but must not be for the C++ binding of MPI"
^
Compilation aborted for my_mpi_program.cpp (code 4)
make: *** [my_mpi_program.o] Error 4
For the application my_mpi_program.cpp, you have two options:
- Try organizing the include files such that mpi.h comes before stdio.h
- Use the -DMPICH_IGNORE_CXX_SEEK and -DMPICH_SKIP_MPICXX options at compile time
- Refer to http://www-unix.mcs.anl.gov/mpi/mpich/faq.htm#cxxseek† for more information.
![]()
† This link will take you off of the Intel Web site. Intel does not control the content of the destination Web Site.
