[MOAB-dev] r3912 - in MOAB/trunk/src: io io/mhdf/src parallel

kraftche at cae.wisc.edu kraftche at cae.wisc.edu
Mon May 17 15:50:31 CDT 2010


Author: kraftche
Date: 2010-05-17 15:50:30 -0500 (Mon, 17 May 2010)
New Revision: 3912

Modified:
   MOAB/trunk/src/io/WriteHDF5.cpp
   MOAB/trunk/src/io/WriteHDF5.hpp
   MOAB/trunk/src/io/mhdf/src/util.c
   MOAB/trunk/src/parallel/WriteHDF5Parallel.cpp
   MOAB/trunk/src/parallel/WriteHDF5Parallel.hpp
Log:
o Add missing peices to enable collective IO during parallel write
o Better error handling when writing HDF5 files
o Fix failure to free HDF5 property object when doing collective IO
o More debugging output for parallel HDF5 writes

Note:  collective IO for parallel writes still isn't entirly complete
  It probably won't work for variable-length tags.  But it is sufficently
  complete to allow evaluation of any performance improvement.



Modified: MOAB/trunk/src/io/WriteHDF5.cpp
===================================================================
--- MOAB/trunk/src/io/WriteHDF5.cpp	2010-05-17 20:44:55 UTC (rev 3911)
+++ MOAB/trunk/src/io/WriteHDF5.cpp	2010-05-17 20:50:30 UTC (rev 3912)
@@ -124,6 +124,13 @@
   // This is the HDF5 type used to store file IDs
 const hid_t WriteHDF5::id_type = get_id_type();
 
+
+// This function doesn't do anything useful.  It's just a nice
+// place to set a break point to determine why the reader fails.
+static inline ErrorCode error( ErrorCode rval )
+  { return rval; }
+
+
   // Some macros to handle error checking.  The
   // CHK_MHDF__ERR* macros check the value of an mhdf_Status 
   // object.  The CHK_MB_ERR_* check the value of an ErrorCode.
@@ -139,7 +146,7 @@
 do if ( mhdf_isError( &(A) )) {                             \
     writeUtil->report_error( "%s\n", mhdf_message( &(A) ) );\
     myassert(0);                                            \
-    return MB_FAILURE;                                      \
+    return error(MB_FAILURE);                               \
 } while(false)                                               
 
 #define CHK_MHDF_ERR_1( A, B )                              \
@@ -147,7 +154,7 @@
     writeUtil->report_error( "%s\n", mhdf_message( &(A) ) );\
     myassert(0);                                            \
     mhdf_closeData( filePtr, (B), &(A) );                   \
-    return MB_FAILURE;                                      \
+    return error(MB_FAILURE);                               \
 } while(false)                                               
 
 #define CHK_MHDF_ERR_2( A, B )                              \
@@ -156,7 +163,7 @@
     myassert(0);                                            \
     mhdf_closeData( filePtr, (B)[0], &(A) );                \
     mhdf_closeData( filePtr, (B)[1], &(A) );                \
-    return MB_FAILURE;                                      \
+    return error(MB_FAILURE);                               \
 } while(false)                                               
 
 #define CHK_MHDF_ERR_3( A, B )                              \
@@ -166,7 +173,7 @@
     mhdf_closeData( filePtr, (B)[0], &(A) );                \
     mhdf_closeData( filePtr, (B)[1], &(A) );                \
     mhdf_closeData( filePtr, (B)[2], &(A) );                \
-    return MB_FAILURE;                                      \
+    return error(MB_FAILURE);                               \


More information about the moab-dev mailing list