[MOAB-dev] r5139 - MOAB/trunk/src/parallel

kraftche at cae.wisc.edu kraftche at cae.wisc.edu
Tue Aug 30 13:13:47 CDT 2011


Author: kraftche
Date: 2011-08-30 13:13:47 -0500 (Tue, 30 Aug 2011)
New Revision: 5139

Modified:
   MOAB/trunk/src/parallel/WriteHDF5Parallel.cpp
Log:
WriteHDF5Parallel: fix bug where no set data is written during parallel write and fix bug communicating shared set data

Modified: MOAB/trunk/src/parallel/WriteHDF5Parallel.cpp
===================================================================
--- MOAB/trunk/src/parallel/WriteHDF5Parallel.cpp	2011-08-30 18:12:45 UTC (rev 5138)
+++ MOAB/trunk/src/parallel/WriteHDF5Parallel.cpp	2011-08-30 18:13:47 UTC (rev 5139)
@@ -1524,7 +1524,7 @@
   
   buffer[0] = flags;
   buffer[1] = tmp.size();
-  if (buffer_size <= tmp.size())
+  if (tmp.size() <= buffer_size)
     std::copy( tmp.begin(), tmp.end(), buffer + 4 );
   
   rval = writeUtil->get_entity_list_pointers( it, nd, &ptr, WriteUtilIface::CHILDREN, &len );
@@ -1533,7 +1533,7 @@
   rval = vector_to_id_list( ptr, len, &tmp[0], newlen, true );
   tmp.resize( newlen );
   buffer[2] = tmp.size();
-  if (buffer_size - buffer[1] <= tmp.size())
+  if (tmp.size() <= buffer_size - buffer[1])
     std::copy( tmp.begin(), tmp.end(), buffer + 4 + buffer[1] );
   
   rval = writeUtil->get_entity_list_pointers( it, nd, &ptr, WriteUtilIface::PARENTS, &len );
@@ -1542,7 +1542,7 @@
   rval = vector_to_id_list( ptr, len, &tmp[0], newlen, true );
   tmp.resize( newlen );
   buffer[3] = tmp.size();
-  if (buffer_size - buffer[1] - buffer[2] <= tmp.size())
+  if (tmp.size() <= buffer_size - buffer[1] - buffer[2])
     std::copy( tmp.begin(), tmp.end(), buffer + 4 + buffer[1] + buffer[2]);
   
   return MB_SUCCESS;
@@ -1926,6 +1926,8 @@
                          SetDescCreator(), NULL, 
                          &setSet.first_id );
   CHECK_MB(rval);
+  writeSets = setSet.max_num_ents > 0;
+  
   rval = assign_ids( setSet.range, setSet.first_id + setSet.offset );
   CHECK_MB(rval);
   if (times) times[SET_OFFSET_TIME] = timer.elapsed();













More information about the moab-dev mailing list