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

kraftche at cae.wisc.edu kraftche at cae.wisc.edu
Tue Jul 14 12:37:52 CDT 2009


Author: kraftche
Date: 2009-07-14 12:37:51 -0500 (Tue, 14 Jul 2009)
New Revision: 3007

Modified:
   MOAB/trunk/parallel/parallel_hdf5_test.cc
Log:
print output describing messed up shared-entity ownership

Modified: MOAB/trunk/parallel/parallel_hdf5_test.cc
===================================================================
--- MOAB/trunk/parallel/parallel_hdf5_test.cc	2009-07-14 16:49:39 UTC (rev 3006)
+++ MOAB/trunk/parallel/parallel_hdf5_test.cc	2009-07-14 17:37:51 UTC (rev 3007)
@@ -137,9 +137,11 @@
         // keep default values of zero (not shared)
       }
       CHECK_ERR(rval);
-      unsigned num_shared = 0;
-      for (size_t j = 0; j < status_flags.size(); ++j)
+      unsigned num_shared = 0, num_owned = 0;
+      for (size_t j = 0; j < status_flags.size(); ++j) {
         num_shared += !!(status_flags[j] & PSTATUS_SHARED);
+        num_owned += !(status_flags[j] & PSTATUS_NOT_OWNED);
+      }
       
       if (!num_shared) {
         if (list_non_shared)
@@ -151,6 +153,11 @@
                << "ERROR: " << num_shared << " of " << entities.size() 
                << " entities marked as 'shared'" << std::endl;
       }
+      else if (num_owned && num_owned != entities.size()) {
+        buffer << rank << ":\t" << topo_names_s[t] << " " << id << ":\t"
+               << "ERROR: " << num_owned << " of " << entities.size() 
+               << " entities owned by this processor" << std::endl;
+      }
       else {
         rval = moab.tag_get_data( sharedp_tag, entities, &shared_procs[0] );
         CHECK_ERR(rval);
@@ -165,7 +172,10 @@
         }
         else if (proc != -1) {
           buffer << rank << ":\t" << topo_names_s[t] << " " << id << ":\t"
-                 << "shared with processor " << proc << std::endl;
+                 << "shared with processor " << proc;
+          if (num_owned)
+            buffer << " (owned by this processor)";
+          buffer << std::endl;
         }
         else if (entities.empty()) {
           buffer << rank << ":\t" << topo_names_s[t] << " " << id << ":\t"
@@ -191,7 +201,9 @@
             for (int j = 0; j < MAX_SHARING_PROCS; ++j)
               if (ent_procs[j] != -1)
                 buffer << ent_procs[j] << ", ";
-              buffer << std::endl;
+            if (num_owned)
+              buffer << " (owned by this processor)";
+            buffer << std::endl;
           }
         }
       }
@@ -346,7 +358,7 @@
     // load and partition a .cub file
   MBCore moab_instance;
   MBInterface& moab = moab_instance;
-  load_and_partition( moab, InputFile );
+  load_and_partition( moab, InputFile, true );
   
     // count number of owned entities of each type and sum over all procs
   count_owned_entities( moab, proc_counts );



More information about the moab-dev mailing list