[MOAB-dev] r4528 - in MOAB/trunk/src/io: . mhdf/src

kraftche at cae.wisc.edu kraftche at cae.wisc.edu
Thu Feb 24 13:08:51 CST 2011


Author: kraftche
Date: 2011-02-24 13:08:51 -0600 (Thu, 24 Feb 2011)
New Revision: 4528

Modified:
   MOAB/trunk/src/io/ReadHDF5.cpp
   MOAB/trunk/src/io/mhdf/src/file.c
Log:
make moab_test pass when moab is built with parallel hdf5 support

Modified: MOAB/trunk/src/io/ReadHDF5.cpp
===================================================================
--- MOAB/trunk/src/io/ReadHDF5.cpp	2011-02-24 17:41:11 UTC (rev 4527)
+++ MOAB/trunk/src/io/ReadHDF5.cpp	2011-02-24 19:08:51 UTC (rev 4528)
@@ -96,7 +96,9 @@
 static herr_t handle_hdf5_error( hid_t stack, void* data )
 {
   ReadHDF5::HDF5ErrorHandler* h = reinterpret_cast<ReadHDF5::HDF5ErrorHandler*>(data);
-  herr_t result = (*h->func)(stack,h->data);
+  herr_t result = 0;
+  if (h->func)
+    result = (*h->func)(stack,h->data);
   error(MB_FAILURE);
   return result;
 }
@@ -104,7 +106,9 @@
 static herr_t handle_hdf5_error( void* data )
 {
   ReadHDF5::HDF5ErrorHandler* h = reinterpret_cast<ReadHDF5::HDF5ErrorHandler*>(data);
-  herr_t result = (*h->func)(h->data);
+  herr_t result = 0;
+  if (h->func)
+    result = (*h->func)(h->data);
   error(MB_FAILURE);
   return result;
 }

Modified: MOAB/trunk/src/io/mhdf/src/file.c
===================================================================
--- MOAB/trunk/src/io/mhdf/src/file.c	2011-02-24 17:41:11 UTC (rev 4527)
+++ MOAB/trunk/src/io/mhdf/src/file.c	2011-02-24 19:08:51 UTC (rev 4528)
@@ -22,6 +22,10 @@
 #include <H5Spublic.h>
 #include <H5Tpublic.h>
 #include <H5Apublic.h>
+#ifdef HDF5_PARALLEL
+#  include <H5FDmpi.h>
+#  include <H5FDmpio.h>
+#endif
 #include "mhdf.h"
 #include "status.h"
 #include "names-and-paths.h"
@@ -291,17 +295,34 @@
   FileHandle* file_ptr;
   unsigned int flags;
   hid_t group_id;
+  herr_t err;
+  int check_is_hdf5 = 1;
+#ifdef HDF5_PARALLEL
+  MPI_Comm comm;
+  MPI_Info info;


More information about the moab-dev mailing list