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

kraftche at cae.wisc.edu kraftche at cae.wisc.edu
Wed May 25 11:59:57 CDT 2011


Author: kraftche
Date: 2011-05-25 11:59:57 -0500 (Wed, 25 May 2011)
New Revision: 4878

Modified:
   MOAB/trunk/src/parallel/ParallelComm.cpp
Log:
fix parallel code from previous checkin

Modified: MOAB/trunk/src/parallel/ParallelComm.cpp
===================================================================
--- MOAB/trunk/src/parallel/ParallelComm.cpp	2011-05-25 16:26:49 UTC (rev 4877)
+++ MOAB/trunk/src/parallel/ParallelComm.cpp	2011-05-25 16:59:57 UTC (rev 4878)
@@ -384,7 +384,7 @@
   Tag pc_tag = pcomm_tag(mbImpl, true);
   assert(0 != pc_tag);
   
-  ErrorCode root = 0;
+  const EntityHandle root = 0;
   ErrorCode result = mbImpl->tag_get_data(pc_tag, &root, 1, (void*)&pc_array[0]);
   if (MB_SUCCESS != result && MB_TAG_NOT_FOUND != result) 
     return -1;
@@ -407,6 +407,7 @@
   std::vector<ParallelComm *> pc_array(MAX_SHARING_PROCS);
   Tag pc_tag = pcomm_tag(mbImpl, true);
   
+  const EntityHandle root = 0;
   ErrorCode result = mbImpl->tag_get_data(pc_tag, &root, 1, (void*)&pc_array[0]);
   std::vector<ParallelComm*>::iterator pc_it = 
     std::find(pc_array.begin(), pc_array.end(), pc);
@@ -415,7 +416,6 @@
     // empty if test to get around compiler warning about unused var
   if (MB_SUCCESS == result);
   *pc_it = NULL;
-  EntityHandle root = 0;
   mbImpl->tag_set_data(pc_tag, &root, 1, (void*)&pc_array[0]);
 }
 
@@ -6508,7 +6508,7 @@
   Tag pc_tag = pcomm_tag(impl, false);
   if (0 == pc_tag) return NULL;
   
-  EntityHandle root = 0;
+  const EntityHandle root = 0;
   ParallelComm *pc_array[MAX_SHARING_PROCS];
   ErrorCode result = impl->tag_get_data(pc_tag, &root, 1, (void*)pc_array);
   if (MB_SUCCESS != result) return NULL;
@@ -6522,7 +6522,7 @@
   if (0 == pc_tag)
     return MB_TAG_NOT_FOUND;
   
-  EntityHandle root;
+  const EntityHandle root = 0;
   ParallelComm *pc_array[MAX_SHARING_PROCS];
   ErrorCode rval = impl->tag_get_data( pc_tag, &root, 1, pc_array );
   if (MB_SUCCESS != rval)
@@ -6593,7 +6593,7 @@
   Tag pc_tag = pcomm_tag(mbImpl, false);
   if (0 == pc_tag) 
     return MB_FAILURE;


More information about the moab-dev mailing list