[MOAB-dev] r3272 - MOAB/trunk

kraftche at cae.wisc.edu kraftche at cae.wisc.edu
Tue Nov 3 12:44:52 CST 2009


Author: kraftche
Date: 2009-11-03 12:44:52 -0600 (Tue, 03 Nov 2009)
New Revision: 3272

Modified:
   MOAB/trunk/MBAdaptiveKDTree.cpp
   MOAB/trunk/ReadHDF5.cpp
   MOAB/trunk/WriteHDF5.cpp
Log:
include MBmpi.h in any C++ code that includes an HDF5 header because otherwise mpi.h might get pulled in indirectly by the HDF5 headers w/out our work-arounds for the SEEK_SET conflicts

Modified: MOAB/trunk/MBAdaptiveKDTree.cpp
===================================================================
--- MOAB/trunk/MBAdaptiveKDTree.cpp	2009-11-03 18:31:31 UTC (rev 3271)
+++ MOAB/trunk/MBAdaptiveKDTree.cpp	2009-11-03 18:44:52 UTC (rev 3272)
@@ -54,6 +54,11 @@
 #define MB_AD_KD_TREE_USE_TWO_DOUBLE_TAG
 
 #if defined(MB_AD_KD_TREE_USE_SINGLE_TAG) && defined(HDF5_FILE)
+  /* include our MPI header before any HDF5 because otherwise
+     it will get included indirectly by HDF5 */
+# ifdef USE_MPI
+#  include "MBmpi.h"
+# endif 
 # include <H5Tpublic.h>
 #endif
 

Modified: MOAB/trunk/ReadHDF5.cpp
===================================================================
--- MOAB/trunk/ReadHDF5.cpp	2009-11-03 18:31:31 UTC (rev 3271)
+++ MOAB/trunk/ReadHDF5.cpp	2009-11-03 18:44:52 UTC (rev 3272)
@@ -24,6 +24,11 @@
 //-------------------------------------------------------------------------
 
 #include <assert.h>
+/* include our MPI header before any HDF5 because otherwise
+   it will get included indirectly by HDF5 */
+#ifdef USE_MPI
+#  include "MBmpi.h"
+#endif 
 #include <H5Tpublic.h>
 #include <H5Ppublic.h>
 #include "MBInterface.hpp"

Modified: MOAB/trunk/WriteHDF5.cpp
===================================================================
--- MOAB/trunk/WriteHDF5.cpp	2009-11-03 18:31:31 UTC (rev 3271)
+++ MOAB/trunk/WriteHDF5.cpp	2009-11-03 18:44:52 UTC (rev 3272)
@@ -41,6 +41,11 @@
 #include <limits>
 #include <cstdio>
 #include <iostream>
+/* include our MPI header before any HDF5 because otherwise
+   it will get included indirectly by HDF5 */
+#ifdef USE_MPI
+#  include "MBmpi.h"
+#endif 
 #include <H5Tpublic.h>
 #include <H5Ppublic.h>
 #include "MBInterface.hpp"



More information about the moab-dev mailing list