[MOAB-dev] r4298 - in MOAB/trunk: itaps/imesh src/parallel src/parallel/moab tools/mbcoupler

tautges at mcs.anl.gov tautges at mcs.anl.gov
Tue Nov 23 11:25:24 CST 2010


Author: tautges
Date: 2010-11-23 11:25:24 -0600 (Tue, 23 Nov 2010)
New Revision: 4298

Modified:
   MOAB/trunk/itaps/imesh/MOAB_iMeshP_unit_tests.cpp
   MOAB/trunk/src/parallel/ParallelComm.cpp
   MOAB/trunk/src/parallel/ProcConfig.cpp
   MOAB/trunk/src/parallel/crystal.c
   MOAB/trunk/src/parallel/crystal.h
   MOAB/trunk/src/parallel/gs.c
   MOAB/trunk/src/parallel/moab/ParallelComm.hpp
   MOAB/trunk/src/parallel/transfer.c
   MOAB/trunk/src/parallel/tuple_list.c
   MOAB/trunk/src/parallel/tuple_list.h
   MOAB/trunk/tools/mbcoupler/Coupler.cpp
Log:
- changing names of a few more gs functions to avoid name conflicts with Nek
- fixing bug resolving parallel interface for cases where a face's vertices are
shared across a number of procs but the face itself isn't shared
- adding some additional debug output in ParallelComm used to diagnose this problem
- fixing MOAB_iMeshP_unit_tests for when run on one proc, which was dying inside
MPI_Gatherv in the single-proc case; shouldn't really die there, but couldn't figure out
what else to do
- adding ParallelComm::get_pstatus

Passes make check in serial and parallel.



Modified: MOAB/trunk/itaps/imesh/MOAB_iMeshP_unit_tests.cpp
===================================================================
--- MOAB/trunk/itaps/imesh/MOAB_iMeshP_unit_tests.cpp	2010-11-23 13:48:36 UTC (rev 4297)
+++ MOAB/trunk/itaps/imesh/MOAB_iMeshP_unit_tests.cpp	2010-11-23 17:25:24 UTC (rev 4298)
@@ -1896,10 +1896,17 @@
     // collect all data on root procesor
   std::vector<int> all_data( 2*global_count );
   std::vector<int> displ(size), counts(size);
-  ierr = MPI_Gatherv( &vtxdata[0], vtxdata.size(), MPI_INT,
-                      &all_data[0], &counts[0], &displ[0], MPI_INT, 
-                      0, MPI_COMM_WORLD );
-  CHKERR;
+  if (1 == size) {
+    std::copy(vtxdata.begin(), vtxdata.end(), all_data.begin());
+    counts[0] = vtxdata.size();
+    displ[0] = 0;
+  }
+  else {
+    ierr = MPI_Gatherv( &vtxdata[0], vtxdata.size(), MPI_INT,
+                        &all_data[0], &counts[0], &displ[0], MPI_INT, 
+                        0, MPI_COMM_WORLD );
+    CHKERR;
+  }
   if (rank == 0) {
       // map from vertex tag to indices into data
     std::multimap<int,int> data_map; 

Modified: MOAB/trunk/src/parallel/ParallelComm.cpp
===================================================================
--- MOAB/trunk/src/parallel/ParallelComm.cpp	2010-11-23 13:48:36 UTC (rev 4297)
+++ MOAB/trunk/src/parallel/ParallelComm.cpp	2010-11-23 17:25:24 UTC (rev 4298)
@@ -33,7 +33,6 @@
 extern "C" 
 {
 #include "types.h"
-#include "minmax.h"
 #include "gs.h"
 #include "errmem.h"
 #include "sort.h"
@@ -499,6 +498,7 @@
   std::vector<unsigned int>::iterator vit = 
     std::find(buffProcs.begin(), buffProcs.end(), to_proc);
   if (vit == buffProcs.end()) {
+    assert("shouldn't need buffer to myself" && to_proc != (int)procConfig.proc_rank());
     ind = buffProcs.size();
     buffProcs.push_back((unsigned int)to_proc);
     localOwnedBuffs.push_back(new Buffer(INITIAL_BUFF_SIZE));
@@ -1198,8 +1198,21 @@
     // now add others, with zero handle for now
   for (std::set<unsigned int>::iterator sit = procs.begin();
        sit != procs.end(); sit++) {


More information about the moab-dev mailing list