Skip to content
bwvdnbro edited this page Mar 14, 2016 · 2 revisions

Are there specific requirements when compiling the code with the Intel compiler suite?

When compiling with the Intel compiler suite (Intel compiler and Intel MPI), compilation in some cases fails with the following error message

[  1%] Building CXX object src/utilities/CMakeFiles/utilities2d.dir/DMParticle.cpp.o
In file included from XXX/impi/4.1.3.045/intel64/include/mpi.h:1279,
                 from XXX/shadowfax/inc/MPIGlobal.hpp:32,
                 from XXX/shadowfax/src/utilities/DMParticle.cpp:27:
XXX/impi/4.1.3.045/intel64/include/mpicxx.h:95:2: error: #error "SEEK_SET is #defined but must not be for the C++ binding of MPI. Include mpi.h before stdio.h"
XXX/impi/4.1.3.045/intel64/include/mpicxx.h:99:2: error: #error "SEEK_CUR is #defined but must not be for the C++ binding of MPI. Include mpi.h before stdio.h"
XXX/impi/4.1.3.045/intel64/include/mpicxx.h:104:2: error: #error "SEEK_END is #defined but must not be for the C++ binding of MPI. Include mpi.h before stdio.h"
make[2]: *** [src/utilities/CMakeFiles/utilities2d.dir/DMParticle.cpp.o] Error 1
make[1]: *** [src/utilities/CMakeFiles/utilities2d.dir/all] Error 2
make: *** [all] Error 2

This can be fixed by adding the DMPICH_IGNORE_CXX_SEEK flag to the compiler flags, which is done by the NO_MPI_SEEK flag for cmake. When configuring using cmake, use:

cmake -DCMAKE_BUILD_TYPE=Release -DNO_MPI_SEEK=True ...
Clone this wiki locally