Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.

error "SEEK_SET is #defined but must not be for the C++ binding of MPI

psing51
New Contributor I
919 Views

I am trying to compile RedMD application with intel parallel studio 2013,
and i am getting following error!

In file included from /share/apps/intel//impi/4.1.3.048/intel64/include/mpi.h:1279,
                 from potentialcalc.cpp:33:
/share/apps/intel//impi/4.1.3.048/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"
/share/apps/intel//impi/4.1.3.048/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"
/share/apps/intel//impi/4.1.3.048/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[3]: *** [potentialcalc.o] Error 1
make[3]: Leaving directory `/share/apps/user1-INTEL/finaluser1/ToolsInstaller/Chemical/RedMD/RedMD_2.3_all/src/potential'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/share/apps/user1-INTEL/finaluser1/ToolsInstaller/Chemical/RedMD/RedMD_2.3_all/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/share/apps/user1-INTEL/finaluser1/ToolsInstaller/Chemical/RedMD/RedMD_2.3_all'
make: *** [all] Error 2
Making install in src

Though this error does not show up in cluster studio 2015 ,
Also a fix is available here (the reference link there is invalid that's why i am asking these questions! )but i want to know
Q1. why this error crops up with v2013
Q2. what is the role of -DMPICH_IGNORE_CXX_SEEK and -DMPICH_SKIP_MPICXX compiler flags?

Awaiting your reply!
 

0 Kudos
3 Replies
Kittur_G_Intel
Employee
919 Views

Hi Puneet,
I"ll touch base with the group supporting MPI and update you accordingly on your questions, fyi.
Thanks,
Kittur 

0 Kudos
Kittur_G_Intel
Employee
919 Views

Hi Puneet,
The problem is that both stdio.h and the MPI C++ interface use SEEK_SET, SEEK_CUR, and SEEK_END. This looks like 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).

The group handling MPI will update the article accordingly. The Intel MPI Library shipped with Cluster Studio 2013 exhibited this issue since it was inherited from MPICH.  It was later fixed so you don’t see it in the Parallel Studio XE Cluster Edition 2015 version.

Hope the above helps. Again, appreciate your patience through this, thx.

_Kittur

0 Kudos
Kittur_G_Intel
Employee
919 Views

@Puneet: I assume my previous communication answered your issue else please let me know, thx.
_Kittur

0 Kudos
Reply