[MOAB-dev] r4996 - in MOAB/trunk: src/io src/parallel test/h5file test/parallel

kraftche at cae.wisc.edu kraftche at cae.wisc.edu
Mon Jun 13 18:41:10 CDT 2011


Author: kraftche
Date: 2011-06-13 18:41:09 -0500 (Mon, 13 Jun 2011)
New Revision: 4996

Modified:
   MOAB/trunk/src/io/WriteHDF5.cpp
   MOAB/trunk/src/io/WriteHDF5.hpp
   MOAB/trunk/src/parallel/WriteHDF5Parallel.cpp
   MOAB/trunk/test/h5file/h5sets_test.cpp
   MOAB/trunk/test/parallel/parallel_hdf5_test.cc
Log:
o Reduce communication and computation negotiating type list during parallel
  HDF5 write
o Fix bug: parallel HDF5 writer fails for polygons/polyhedra 
o Fix bug: if a tag is not defined on the root process its default value
   doesn't get written during parallel HDF5 write
o Fix bug: parallel HDF5 write fails if database contains no vertices
o Add unit test for parallel HDF5 write where some element types occur
   only on processors other than the root
o Add unit test for parallel HDF5 write where some tags are defined 
   only on processors other than the root
o Add unit test for parallel HDF5 write of polygons 
o Add unit tests for writing list-type set containing stale entity handles
   to HDF5 file
o Fix segfault in in HDF5 writer if debug output is enabled, moab is
  compiled with parallel support, and a serial write is done (don't
  dereference null ParallelComm pointer).
o Fix bug: HDF5 writer failed to write default value for handle tag
   if it contained only zero-valued handles.
o Fix bug: parallel HDF5 writer fails if variable-length tags are defined.
o Fix bug: parallel HDF5 writer hangs writing variable-length tag data



Modified: MOAB/trunk/src/io/WriteHDF5.cpp
===================================================================
--- MOAB/trunk/src/io/WriteHDF5.cpp	2011-06-13 23:40:42 UTC (rev 4995)
+++ MOAB/trunk/src/io/WriteHDF5.cpp	2011-06-13 23:41:09 UTC (rev 4996)
@@ -913,6 +913,9 @@
   hid_t node_table;
   long first_id, num_nodes;
 
+  if (!nodeSet.total_num_ents)
+    return MB_SUCCESS; // no nodes!
+
   CHECK_OPEN_HANDLES;
   
   rval = iFace->get_dimension( mesh_dim );
@@ -2037,10 +2040,9 @@
   size_t remaining = range.size();
   size_t offset = tag_data.sparse_offset;
   size_t num_writes = (remaining + chunk_size - 1)/chunk_size;
-    //size_t num_global_writes = num_writes;
   if (tag_data.max_num_ents) {
     assert(tag_data.max_num_ents >= (unsigned long)remaining);
-      //num_global_writes = (tag_data.max_num_ents + chunk_size - 1)/chunk_size;
+    num_writes = (tag_data.max_num_ents + chunk_size - 1)/chunk_size;
   }
   Range::const_iterator iter = range.begin();
   while (remaining)
@@ -3119,10 +3121,8 @@
       // convert default value
     if (def_value) {
       memcpy( dataBuffer, def_value, def_val_len*sizeof(EntityHandle) );
-      if (convert_handle_tag( reinterpret_cast<EntityHandle*>(dataBuffer), def_val_len ))
-        def_value = dataBuffer;
-      else
-        def_value = 0;
+      convert_handle_tag( reinterpret_cast<EntityHandle*>(dataBuffer), def_val_len );
+      def_value = dataBuffer;
     }
     
       // convert mesh value

Modified: MOAB/trunk/src/io/WriteHDF5.hpp
===================================================================
--- MOAB/trunk/src/io/WriteHDF5.hpp	2011-06-13 23:40:42 UTC (rev 4995)
+++ MOAB/trunk/src/io/WriteHDF5.hpp	2011-06-13 23:41:09 UTC (rev 4996)
@@ -95,12 +95,19 @@
     //! processor.
     long total_num_ents;
     
-    bool operator<( const ExportSet& other ) const
+    bool operator<( const ExportType& other ) const
       { return type < other.type || 


More information about the moab-dev mailing list