[cgma-dev] r5164 - cgm/trunk/geom/parallel

hongjun at mcs.anl.gov hongjun at mcs.anl.gov
Thu Sep 15 17:00:51 CDT 2011


Author: hongjun
Date: 2011-09-15 17:00:51 -0500 (Thu, 15 Sep 2011)
New Revision: 5164

Modified:
   cgm/trunk/geom/parallel/CABodies.cpp
   cgm/trunk/geom/parallel/CABodies.hpp
Log:
o ghost proc list is added for scatter geometry distribution method
o passes make check


Modified: cgm/trunk/geom/parallel/CABodies.cpp
===================================================================
--- cgm/trunk/geom/parallel/CABodies.cpp	2011-09-15 16:51:34 UTC (rev 5163)
+++ cgm/trunk/geom/parallel/CABodies.cpp	2011-09-15 22:00:51 UTC (rev 5164)
@@ -58,6 +58,12 @@
   for (int i = num_list; i > 0; i--) {
     m_sharedProcs.append(*(i_list->get_and_step()));
   }
+
+  // ghost procs
+  num_list = *(i_list->get_and_step());
+  for (int i = num_list; i > 0; i--) {
+    m_ghostProcs.append(*(i_list->get_and_step()));
+  }
 }
 
 CABodies::CABodies(RefEntity* new_attrib_owner)
@@ -112,7 +118,7 @@
 
     par->get_shared_proc_list()->reset();
     m_sharedProcs.reset();
-    size = par->get_shared_body_list()->size();
+    size = par->get_shared_proc_list()->size();
 
     for (int i = 0; i < size; i++) {
       if (par->get_shared_proc_list()->get_and_step() != m_sharedProcs.get_and_step()) {
@@ -122,6 +128,18 @@
       }
     }
 
+    par->get_ghost_proc_list()->reset();
+    m_ghostProcs.reset();
+    size = par->get_ghost_proc_list()->size();
+
+    for (int i = 0; i < size; i++) {
+      if (par->get_ghost_proc_list()->get_and_step() != m_ghostProcs.get_and_step()) {
+	PRINT_ERROR("Different ghost processor found for %s %d.\n",
+		    attrib_owner()->class_name(), attrib_owner()->id());
+	return CUBIT_FAILURE;
+      }
+    }
+
     if (par->get_unique_id() != m_uniqueID) {
       PRINT_ERROR("Different unique ID found for %s %d.\n",
 		  attrib_owner()->class_name(), attrib_owner()->id());
@@ -177,6 +195,14 @@
     for (int i = 0; i < size; i++) {
       m_sharedProcs.append(td_par->get_shared_proc_list()->get_and_step());
     }
+
+    size = td_par->get_ghost_proc_list()->size();


More information about the cgma-dev mailing list