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

hongjun at mcs.anl.gov hongjun at mcs.anl.gov
Thu Jul 7 15:48:10 CDT 2011


Author: hongjun
Date: 2011-07-07 15:48:10 -0500 (Thu, 07 Jul 2011)
New Revision: 5048

Modified:
   cgm/trunk/geom/parallel/CGMReadParallel.cpp
   cgm/trunk/geom/parallel/CGMReadParallel.hpp
Log:
o Partitioned geometry by mbzoltan partitioner can be supported in parallel CGM
o As a result, round-robin(embedded), body-only and body and surface partitioning(by mbzoltan partitioner) are supported
o Parent bodies of partitioned surfaces are also distributed to processors
o Passes make check


Modified: cgm/trunk/geom/parallel/CGMReadParallel.cpp
===================================================================
--- cgm/trunk/geom/parallel/CGMReadParallel.cpp	2011-07-07 20:38:17 UTC (rev 5047)
+++ cgm/trunk/geom/parallel/CGMReadParallel.cpp	2011-07-07 20:48:10 UTC (rev 5048)
@@ -59,6 +59,8 @@
     if (NULL == m_pcomm) m_pcomm = new CGMParallelComm();
   }
 
+  m_round_robin = false;
+  m_partition_static = false;
   m_scatter = false;
   m_rank = m_pcomm->proc_config().proc_rank();
   m_proc_size = m_pcomm->proc_config().proc_size();
@@ -117,7 +119,7 @@
     }
     // static partition, use chaco
     else if (partition_tag_name == "PAR_PARTITION_STATIC") {
-
+      m_partition_static = true;
     }
     // dynamic partition, use zoltan
     else if (partition_tag_name == "PAR_PARTITION_DYNAMIC") {
@@ -267,8 +269,7 @@
 //==================
     case PA_BALANCE:
       if (CGM_read_parallel_debug) std::cout << "Balancing entities." << std::endl;
-      
-      result = balance();
+      if (m_round_robin) result = balance_round_robin();
       if (CUBIT_SUCCESS != result) return result;
 
       if (CGM_read_parallel_debug) PRINT_INFO("Balancing entities done.\n");
@@ -406,7 +407,7 @@
   return result;
 }
 
-CubitStatus CGMReadParallel::balance()
+CubitStatus CGMReadParallel::balance_round_robin()
 {
   // get bodies
   int i, j;
@@ -560,35 +561,60 @@
       return CUBIT_FAILURE;
     }
 
-    if (td_par->get_charge_proc() != m_rank) delete_body_list.append(entity);
+    if (td_par->get_charge_proc() != m_rank) { // candidate to be deleted
+      // check child surfaces
+      DLIList<RefFace*> face_list;
+      (dynamic_cast<TopologyEntity*> (entity))->ref_faces(face_list);
+      bool b_partitioned_surf = false;


More information about the cgma-dev mailing list