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

tautges at mcs.anl.gov tautges at mcs.anl.gov
Thu Jul 30 13:48:36 CDT 2009


Author: tautges
Date: 2009-07-30 13:48:36 -0500 (Thu, 30 Jul 2009)
New Revision: 3077

Modified:
   MOAB/trunk/parallel/ReadParallel.cpp
   MOAB/trunk/parallel/mbparallelcomm_test.cpp
   MOAB/trunk/parallel/pcomm_unit.cpp
Log:
ReadParallel: added a little debug output.
pcomm_unit: adding destruction of MBParallelComm objects before MOAB instances go away.
mbparallelcomm_test: enabling READ_PART option.



Modified: MOAB/trunk/parallel/ReadParallel.cpp
===================================================================
--- MOAB/trunk/parallel/ReadParallel.cpp	2009-07-30 18:41:07 UTC (rev 3076)
+++ MOAB/trunk/parallel/ReadParallel.cpp	2009-07-30 18:48:36 UTC (rev 3077)
@@ -16,7 +16,7 @@
 #include <algorithm>
 #include <assert.h>
 
-const bool debug = false;
+const bool debug = true;
 
 #define RR(a) if (MB_SUCCESS != result) {                               \
       dynamic_cast<MBCore*>(mbImpl)->get_error_handler()->set_last_error(a); \
@@ -309,6 +309,9 @@
           break;
 //==================
       case PA_READ_PART: {
+        if (debug)
+          std::cout << "Reading file " << file_names[0] << std::endl;
+
           i_read = true;
           if (num_files != 1) {
             merror->set_last_error("Multiple file read not supported for READ_PART");

Modified: MOAB/trunk/parallel/mbparallelcomm_test.cpp
===================================================================
--- MOAB/trunk/parallel/mbparallelcomm_test.cpp	2009-07-30 18:41:07 UTC (rev 3076)
+++ MOAB/trunk/parallel/mbparallelcomm_test.cpp	2009-07-30 18:48:36 UTC (rev 3077)
@@ -308,7 +308,7 @@
       options << "PARALLEL=READ_DELETE;PARTITION=" << tag_name;
       break;
     case -2:
-      options << "PARALLEL=READ_PARALLEL;PARTITION=" << tag_name;
+      options << "PARALLEL=READ_PART;PARTITION=" << tag_name;
       break;
     case -3:
       options << "PARALLEL=BCAST;PARTITION=" << tag_name;

Modified: MOAB/trunk/parallel/pcomm_unit.cpp
===================================================================
--- MOAB/trunk/parallel/pcomm_unit.cpp	2009-07-30 18:41:07 UTC (rev 3076)
+++ MOAB/trunk/parallel/pcomm_unit.cpp	2009-07-30 18:48:36 UTC (rev 3077)
@@ -1832,6 +1832,9 @@
     // now 1 layer of hex ghosts
   rval = MBParallelComm::exchange_ghost_cells(pc, 4, 2, 0, 1, true);
   CHECK_ERR(rval);
+
+  for (unsigned int i = 0; i < 4; i++)
+    delete pc[i];
 }
 
 void test_pack_shared_entities_3d()
@@ -1857,6 +1860,9 @@
     // now 1 layer of hex ghosts
   rval = MBParallelComm::exchange_ghost_cells(pc, 4, 3, 0, 1, true);
   CHECK_ERR(rval);
+
+  for (unsigned int i = 0; i < 4; i++)
+    delete pc[i];
 }
 
 void test_pack_shared_arbitrary()
@@ -1913,6 +1919,9 @@
     // now 1 layer of hex ghosts
   rval = MBParallelComm::exchange_ghost_cells(pc, NP, 3, 0, 1, true);
   CHECK_ERR(rval);
+
+  for (unsigned int i = 0; i < NP; i++)
+    delete pc[i];
 }
 
 void test_filter_pstatus()
@@ -2015,4 +2024,5 @@
   CHECK(tmp_range.size() == 3 && tmp_range[0] == verts[3] && 
         tmp_range[1] == verts[4] && tmp_range[2] == verts[5]);
   
+  delete pcomm;
 }



More information about the moab-dev mailing list