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

hongjun at mcs.anl.gov hongjun at mcs.anl.gov
Tue Oct 4 14:09:49 CDT 2011


Author: hongjun
Date: 2011-10-04 14:09:47 -0500 (Tue, 04 Oct 2011)
New Revision: 5184

Modified:
   MOAB/trunk/src/parallel/ParallelComm.cpp
   MOAB/trunk/src/parallel/moab/ParallelComm.hpp
Log:
o migrate option is added to exchange_owned_meshes
o passes make check


Modified: MOAB/trunk/src/parallel/ParallelComm.cpp
===================================================================
--- MOAB/trunk/src/parallel/ParallelComm.cpp	2011-10-01 03:07:17 UTC (rev 5183)
+++ MOAB/trunk/src/parallel/ParallelComm.cpp	2011-10-04 19:09:47 UTC (rev 5184)
@@ -5699,7 +5699,8 @@
 ErrorCode ParallelComm::exchange_owned_meshs(std::vector<unsigned int>& exchange_procs,
                                              std::vector<Range*>& exchange_ents,
                                              bool store_remote_handles,
-                                             bool wait_all)
+                                             bool wait_all,
+                                             bool migrate)
 {
   // filter out entities already shared with destination
   // exchange twice for entities and sets
@@ -5717,12 +5718,12 @@
 
   // exchange entities first
   result = exchange_owned_mesh(exchange_procs, exchange_ents,
-                               store_remote_handles, wait_all);
+                               store_remote_handles, wait_all, migrate);
   RRA("Couldn't exchange owned mesh entities.");
 
   // exchange sets
   result = exchange_owned_mesh(exchange_procs_sets, exchange_sets,
-                               store_remote_handles, wait_all);
+                               store_remote_handles, wait_all, migrate);
   RRA("Couldn't exchange owned mesh sets.");
 
   for (int i = 0; i < n_proc; i++) delete exchange_sets[i];
@@ -5733,7 +5734,8 @@
 ErrorCode ParallelComm::exchange_owned_mesh(std::vector<unsigned int>& exchange_procs,
                                             std::vector<Range*>& exchange_ents,
                                             bool store_remote_handles,
-                                            bool wait_all)
+                                            bool wait_all,
+                                            bool migrate)
 {
 #ifdef USE_MPE
   if (myDebug->get_verbosity() == 2) {
@@ -5953,9 +5955,13 @@
     }
   }
 
-  // assign newly created elements to receive processor
+  // assign and remove newly created elements from/to receive processor
   result = assign_entities_part(new_ents, procConfig.proc_rank());
   RRA("Failed to assign entities to part.");
+  if (migrate) {
+    result = remove_entities_part(allsent, procConfig.proc_rank());
+    RRA("Failed to remove entities to part.");
+  }


More information about the moab-dev mailing list