Skip to Content.
Sympa Menu

charm - Re: [charm] Charm 6.5.0 compilation issue

charm AT lists.cs.illinois.edu

Subject: Charm++ parallel programming system

List archive

Re: [charm] Charm 6.5.0 compilation issue


Chronological Thread 
  • From: Ake Sandgren <ake.sandgren AT hpc2n.umu.se>
  • To: Dmitry Osolodkin <dmitry_o AT qsar.chem.msu.ru>
  • Cc: namd-l AT ks.uiuc.edu, charm AT cs.illinois.edu
  • Subject: Re: [charm] Charm 6.5.0 compilation issue
  • Date: Fri, 11 Jan 2013 19:21:43 +0100
  • List-archive: <http://lists.cs.uiuc.edu/pipermail/charm/>
  • List-id: CHARM parallel programming system <charm.cs.uiuc.edu>

On Fri, 2013-01-11 at 17:17 +0400, Dmitry Osolodkin wrote:
> Dear developers,
>
> I'm trying to compile current Nightly build of NAMD with Charm 6.5.0 and
> Intel compilers. My command is: env MPICXX=mpiicc ./build charm++
> mpi-linux-x86_64 --with-production
>
> I used env MPICXX=mpiicpc or env MPICXX=mpiicc because default mpicxx
> points to gcc compiler, but in both cases results are the same:
>
> /share/intel/impi/4.0.3.008/intel64/include/mpicxx.h(93): catastrophic
> error: #error directive: "SEEK_SET is #defined but must not be for the C++
> binding of MPI. Include mpi.h before stdio.h"
> #error "SEEK_SET is #defined but must not be for the C++ binding of MPI.
> Include mpi.h before stdio.h"

I have a patch for this already.
It's probably not the very best but it works for me.



--
Ake Sandgren, HPC2N, Umea University, S-90187 Umea, Sweden
Internet:
ake AT hpc2n.umu.se
Phone: +46 90 7866134 Fax: +46 90 7866126
Mobile: +46 70 7716134 WWW: http://www.hpc2n.umu.se
commit dbc4647dab33d38a08bc3f626b8df5c120162194
Author: Ake Sandgren <ake AT hpc2n.umu.se>
Date:   Tue Jan 8 18:38:20 2013 +0100

    Intel MPI needs mpi.h included before stdio.h for C++ bindings to work.

diff --git a/src/ck-core/mpi-interoperate.h b/src/ck-core/mpi-interoperate.h
index 3f89746..d8143d8 100644
--- a/src/ck-core/mpi-interoperate.h
+++ b/src/ck-core/mpi-interoperate.h
@@ -1,9 +1,7 @@
 #ifndef _MPI_INTEROPERATE_
 #define _MPI_INTEROPERATE_
 
-#include "converse.h"
-#include "ck.h"
-#include "trace.h"
+#include "conv-config.h"
 
 #if CMK_CONVERSE_MPI
 #include <mpi.h>
@@ -12,6 +10,10 @@ extern "C" void CharmLibInit(MPI_Comm userComm, int argc, char **argv);
 extern "C" void CharmLibInit(int userComm, int argc, char **argv);
 #endif
 
+#include "converse.h"
+#include "ck.h"
+#include "trace.h"
+
 extern "C" void CharmLibExit();
 
 extern "C" void LibCkExit(void);
diff --git a/src/ck-core/mpi-mainmodule.C b/src/ck-core/mpi-mainmodule.C
index e604d13..3a9ebc3 100644
--- a/src/ck-core/mpi-mainmodule.C
+++ b/src/ck-core/mpi-mainmodule.C
@@ -1,3 +1,5 @@
+#include <mpi.h>
+
 #include "mpi_main.decl.h"
 #include "mpi-interoperate.h"
 



Archive powered by MHonArc 2.6.16.

Top of Page