[MOAB-dev] r4891 - MOAB/trunk/src/parallel

hongjun at mcs.anl.gov hongjun at mcs.anl.gov
Fri May 27 13:00:19 CDT 2011


Author: hongjun
Date: 2011-05-27 13:00:18 -0500 (Fri, 27 May 2011)
New Revision: 4891

Modified:
   MOAB/trunk/src/parallel/ParallelComm.cpp
Log:
o Communication buffers are newly created in "exchange_owned_mesh"
o Passes make check


Modified: MOAB/trunk/src/parallel/ParallelComm.cpp
===================================================================
--- MOAB/trunk/src/parallel/ParallelComm.cpp	2011-05-27 13:02:12 UTC (rev 4890)
+++ MOAB/trunk/src/parallel/ParallelComm.cpp	2011-05-27 18:00:18 UTC (rev 4891)
@@ -1719,7 +1719,7 @@
         //=======================================
       bool created_here = false;
       if (!new_h && !is_iface) {
-        
+
         if (MBVERTEX == this_type) {
             // create a vertex
           result = mbImpl->create_vertex(coords, new_h);
@@ -4779,7 +4779,7 @@
       }
 
     }
-    
+
       // send 2nd message
     PRINT_DEBUG_ISEND(procConfig.proc_rank(), from_proc, 
                       send_buff->mem_ptr+INITIAL_BUFF_SIZE,
@@ -4803,7 +4803,7 @@
       // message completely received - signal that we're done
     done = true;
   }
-  
+
   return MB_SUCCESS;
 }
 
@@ -5334,6 +5334,10 @@
   ErrorCode result = MB_SUCCESS;
   int incoming1 = 0, incoming2 = 0;
 
+  // clear all buffers
+  delete_all_buffers();
+  buffProcs.clear();
+
   // set buffProcs with communicating procs
   int n_proc = exchange_procs.size();
   for (i = 0; i < n_proc; i++) {
@@ -5363,10 +5367,8 @@
   // index reqs the same as buffer/sharing procs indices
   std::vector<MPI_Request> recv_ent_reqs(2*buffProcs.size(), MPI_REQUEST_NULL),
     recv_remoteh_reqs(2*buffProcs.size(), MPI_REQUEST_NULL);
-  std::vector<unsigned int>::iterator proc_it;
   sendReqs.resize(2*buffProcs.size(), MPI_REQUEST_NULL);
-  for (i = 0; i < n_proc; i++) {
-    ind = get_buffers(exchange_procs[i]);
+  for (ind = 0; ind < buffProcs.size(); ind++) {


More information about the moab-dev mailing list