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

tautges at mcs.anl.gov tautges at mcs.anl.gov
Fri Mar 18 17:37:32 CDT 2011


Author: tautges
Date: 2011-03-18 17:37:32 -0500 (Fri, 18 Mar 2011)
New Revision: 4612

Modified:
   MOAB/trunk/src/parallel/ParallelComm.cpp
   MOAB/trunk/src/parallel/moab/ParallelComm.hpp
Log:
Replacing proc_nranges with proc_nvecs, and replacing a range with a vector.
Profiling has long shown that inserts into this vector eat a lot of time.

Passes make check, and also a separate test on mbconvert.



Modified: MOAB/trunk/src/parallel/ParallelComm.cpp
===================================================================
--- MOAB/trunk/src/parallel/ParallelComm.cpp	2011-03-18 19:58:22 UTC (rev 4611)
+++ MOAB/trunk/src/parallel/ParallelComm.cpp	2011-03-18 22:37:32 UTC (rev 4612)
@@ -3373,14 +3373,14 @@
   j = 0; i = 0;
 
     // get ents shared by 1 or n procs
-  std::map<std::vector<int>, Range> proc_nranges;
+  std::map<std::vector<int>, std::vector<EntityHandle> > proc_nvecs;
   Range proc_verts;
   result = mbImpl->get_adjacencies(proc_ents, 0, false, proc_verts,
                                    Interface::UNION);
   RRA("Couldn't get proc_verts.");
   
   result = tag_shared_verts(shared_verts, skin_ents,
-                            proc_nranges, proc_verts);
+                            proc_nvecs, proc_verts);
   RRA("Trouble tagging shared verts.");
 
 #ifdef DEBUG_MPE
@@ -3389,14 +3389,14 @@
 
     // get entities shared by 1 or n procs
   result = tag_shared_ents(resolve_dim, shared_dim, skin_ents,
-                           proc_nranges);
+                           proc_nvecs);
   RRA("Trouble tagging shared entities.");
 
   tuple_list_free(&shared_verts);
   
   if (debug) {
-    for (std::map<std::vector<int>, Range>::const_iterator mit = proc_nranges.begin();
-         mit != proc_nranges.end(); mit++) {
+    for (std::map<std::vector<int>, std::vector<EntityHandle> >::const_iterator mit = proc_nvecs.begin();
+         mit != proc_nvecs.end(); mit++) {
       std::cout << "Iface: ";
       for (std::vector<int>::const_iterator vit = (mit->first).begin();
            vit != (mit->first).end(); vit++) std::cout << " " << *vit;
@@ -3407,7 +3407,7 @@
     // create the sets for each interface; store them as tags on
     // the interface instance
   Range iface_sets;
-  result = create_interface_sets(proc_nranges, resolve_dim, shared_dim);
+  result = create_interface_sets(proc_nvecs, resolve_dim, shared_dim);
   RRA("Trouble creating iface sets.");
 
     // establish comm procs and buffers for them
@@ -3675,7 +3675,7 @@
   
 ErrorCode ParallelComm::create_interface_sets(int resolve_dim, int shared_dim) 


More information about the moab-dev mailing list