[MOAB-dev] r1726 - MOAB/trunk/parallel

tautges at mcs.anl.gov tautges at mcs.anl.gov
Mon Mar 31 12:46:33 CDT 2008


Author: tautges
Date: 2008-03-31 12:46:33 -0500 (Mon, 31 Mar 2008)
New Revision: 1726

Modified:
   MOAB/trunk/parallel/MBParallelComm.cpp
   MOAB/trunk/parallel/pcomm_unit.cpp
Log:
Fixing for recent changes to pack_ and unpack_ functions.  Also fixed a bug in packing sets with zero members.


Modified: MOAB/trunk/parallel/MBParallelComm.cpp
===================================================================
--- MOAB/trunk/parallel/MBParallelComm.cpp	2008-03-31 17:11:09 UTC (rev 1725)
+++ MOAB/trunk/parallel/MBParallelComm.cpp	2008-03-31 17:46:33 UTC (rev 1726)
@@ -725,7 +725,10 @@
                                                int num_ents, int to_proc,
                                                const MBRange &new_ents) 
 {
-  if (0 == num_ents) return MB_FAILURE;
+    // NOTE: THIS IMPLEMENTATION IS JUST LIKE THE RANGE-BASED VERSION, NO REUSE
+    // AT THIS TIME, SO IF YOU FIX A BUG IN THIS VERSION, IT MAY BE IN THE
+    // OTHER VERSION TOO!!!
+  if (0 == num_ents) return MB_SUCCESS;
   
     // use a local destination ptr in case we're doing an in-place copy
   std::vector<MBEntityHandle> tmp_vector;
@@ -824,7 +827,10 @@
                                                int to_proc,
                                                const MBRange &new_ents) 
 {
-  if (from_range.empty()) return MB_FAILURE;
+    // NOTE: THIS IMPLEMENTATION IS JUST LIKE THE VECTOR-BASED VERSION, NO REUSE
+    // AT THIS TIME, SO IF YOU FIX A BUG IN THIS VERSION, IT MAY BE IN THE
+    // OTHER VERSION TOO!!!
+  if (from_range.empty()) return MB_SUCCESS;
   
   if (!store_remote_handles) {
     int err;

Modified: MOAB/trunk/parallel/pcomm_unit.cpp
===================================================================
--- MOAB/trunk/parallel/pcomm_unit.cpp	2008-03-31 17:11:09 UTC (rev 1725)
+++ MOAB/trunk/parallel/pcomm_unit.cpp	2008-03-31 17:46:33 UTC (rev 1726)
@@ -69,10 +69,12 @@
   MBRange tmp_range;
   MBParallelComm pcomm( &moab );
   int size = 0;
-  rval = pcomm.pack_buffer( entities, false, true, true, tmp_range, size );
+  rval = pcomm.pack_buffer( entities, false, true, true, false,
+                            -1, tmp_range, size );
   CHECK_ERR(rval);
   pcomm.buffer_size( size );
-  rval = pcomm.pack_buffer( entities, false, true, false, tmp_range, size );
+  rval = pcomm.pack_buffer( entities, false, true, false, false,
+                            -1, tmp_range, size );
   CHECK_ERR(rval);
   
   std::vector<unsigned char> buffer;
@@ -87,7 +89,7 @@
   new (&pcomm) MBParallelComm( &moab, buffer );
   
   entities.clear();
-  rval = pcomm.unpack_buffer( entities );
+  rval = pcomm.unpack_buffer( entities, false, -1 );
   CHECK_ERR(rval);
 }
 void pack_unpack_mesh( MBCore& moab )




More information about the moab-dev mailing list