[MOAB-dev] r4202 - in MOAB/trunk/src/parallel: . moab

kraftche at cae.wisc.edu kraftche at cae.wisc.edu
Thu Oct 7 12:52:35 CDT 2010


Author: kraftche
Date: 2010-10-07 12:52:35 -0500 (Thu, 07 Oct 2010)
New Revision: 4202

Modified:
   MOAB/trunk/src/parallel/ParallelComm.cpp
   MOAB/trunk/src/parallel/moab/ParallelComm.hpp
Log:
need to do exchange_tags(GLOBAL_ID) at end of ParallelComm::assign_global_ids so that procs don't have garbage IDs for non-owned entities

Modified: MOAB/trunk/src/parallel/ParallelComm.cpp
===================================================================
--- MOAB/trunk/src/parallel/ParallelComm.cpp	2010-10-07 15:43:19 UTC (rev 4201)
+++ MOAB/trunk/src/parallel/ParallelComm.cpp	2010-10-07 17:52:35 UTC (rev 4202)
@@ -410,11 +410,12 @@
 
 //! assign a global id space, for largest-dimension or all entities (and
 //! in either case for vertices too)
-ErrorCode ParallelComm::assign_global_ids(EntityHandle this_set,
-                                              const int dimension, 
-                                              const int start_id,
-                                              const bool largest_dim_only,
-                                              const bool parallel) 
+ErrorCode ParallelComm::assign_global_ids( EntityHandle this_set,
+                                           const int dimension, 
+                                           const int start_id,
+                                           const bool largest_dim_only,
+                                           const bool parallel,
+                                           const bool owned_only) 
 {
   Range entities[4];
   int local_num_elements[4];
@@ -481,7 +482,13 @@
     RRA("Failed to set global id tag in assign_global_ids.");
   }
   
-  return MB_SUCCESS;
+  if (owned_only)
+    return MB_SUCCESS;
+  
+    // Exchange tags
+  for (int dim = 1; dim < 4; dim++) 
+    entities[0].merge( entities[dim] );
+  return exchange_tags( gid_tag, entities[0] );
 }
 
 int ParallelComm::get_buffers(int to_proc, bool *is_new) 
@@ -2850,7 +2857,7 @@
 
     else if (MB_ALREADY_ALLOCATED != result) {
         // just created it, so we need global ids
-      result = assign_global_ids(0, skin_dim+1);
+      result = assign_global_ids(0, skin_dim+1,true,true,true);
       RRA("Failed assigning global ids.");
     }
   }
@@ -3627,7 +3634,8 @@
                                              const int dimension, 
                                              const int start_id,
                                              const bool largest_dim_only,
-                                             const bool parallel)


More information about the moab-dev mailing list