[MOAB-dev] r5125 - in MOAB/trunk: src src/parallel test/parallel

tautges at mcs.anl.gov tautges at mcs.anl.gov
Fri Aug 26 13:10:30 CDT 2011


Author: tautges
Date: 2011-08-26 13:10:30 -0500 (Fri, 26 Aug 2011)
New Revision: 5125

Modified:
   MOAB/trunk/src/ScdInterface.cpp
   MOAB/trunk/src/parallel/ParallelComm.cpp
   MOAB/trunk/src/parallel/ReadParallel.cpp
   MOAB/trunk/test/parallel/scdpart.cpp
Log:
Check the actual number of total vertices after sharing is computed in the structured
mesh partition test.  Also add a little more checking for debug-only builds after
shared entities are resolved.  Fixed one bug in the sqjk partition method turned up by
these checks.

Passes make check in parallel.



Modified: MOAB/trunk/src/ScdInterface.cpp
===================================================================
--- MOAB/trunk/src/ScdInterface.cpp	2011-08-26 17:56:28 UTC (rev 5124)
+++ MOAB/trunk/src/ScdInterface.cpp	2011-08-26 18:10:30 UTC (rev 5125)
@@ -735,14 +735,13 @@
   }
   
   if (!box) return MB_FAILURE;
-  else {
-      // check the # ents in the box against the num in the set, to make sure it's only 1 box;
-      // reuse tmp_range
-    tmp_range.clear();
-    rval = mbImpl->get_entities_by_dimension(seth, box->box_dimension(), tmp_range);
-    if (MB_SUCCESS != rval) return rval;
-    if (box->num_elements() != (int)tmp_range.size()) return MB_FAILURE;
-  }
+
+    // check the # ents in the box against the num in the set, to make sure it's only 1 box;
+    // reuse tmp_range
+  tmp_range.clear();
+  rval = mbImpl->get_entities_by_dimension(seth, box->box_dimension(), tmp_range);
+  if (MB_SUCCESS != rval) return rval;
+  if (box->num_elements() != (int)tmp_range.size()) return MB_FAILURE;
     
   const int *gdims = box->global_box_dims();
   if ((gdims[0] == gdims[3] && gdims[1] == gdims[4] && gdims[2] == gdims[5]) ||
@@ -799,6 +798,7 @@
       shared_data.vi[j++] = procs[p];
       shared_data.vul[k++] = shandles[0] + lh[i];
       shared_data.vul[k++] = rhandles[4*p] + rh[i];
+      shared_data.n++;
     }
     incoming--;
   }
@@ -818,6 +818,11 @@
     // create interface sets
   rval = pcomm->create_interface_sets(proc_nvecs, -1, -1);
   if (MB_SUCCESS != rval) return rval;
+
+#ifndef NDEBUG
+  rval = pcomm->check_all_shared_handles();
+  if (MB_SUCCESS != rval) return rval;
+#endif
   
   return MB_SUCCESS;
   
@@ -1053,7 +1058,6 @@
     }
   }
 
-  bdy_ind[0] = 0;


More information about the moab-dev mailing list