[MOAB-dev] r2145 - in MOAB/trunk: . parallel

kraftche at mcs.anl.gov kraftche at mcs.anl.gov
Tue Oct 14 14:43:41 CDT 2008


Author: kraftche
Date: 2008-10-14 14:43:41 -0500 (Tue, 14 Oct 2008)
New Revision: 2145

Modified:
   MOAB/trunk/MBParallelConventions.h
   MOAB/trunk/parallel/MBParallelComm.cpp
   MOAB/trunk/parallel/MBParallelComm.hpp
   MOAB/trunk/parallel/WriteHDF5Parallel.cpp
Log:
fix mistakes in previous checkin

Modified: MOAB/trunk/MBParallelConventions.h
===================================================================
--- MOAB/trunk/MBParallelConventions.h	2008-10-14 19:42:14 UTC (rev 2144)
+++ MOAB/trunk/MBParallelConventions.h	2008-10-14 19:43:41 UTC (rev 2145)
@@ -37,8 +37,6 @@
  */
 #define PARALLEL_PARITIONING_TAG_NAME "PARALLEL_MESH_PARITIONING"
 
-/** \brief Tag designating a 
- 
 /** \brief Tag storing which other processor a given entity is shared with
  *
  * This single-valued tag implies an entity is shared with one other proc

Modified: MOAB/trunk/parallel/MBParallelComm.cpp
===================================================================
--- MOAB/trunk/parallel/MBParallelComm.cpp	2008-10-14 19:42:14 UTC (rev 2144)
+++ MOAB/trunk/parallel/MBParallelComm.cpp	2008-10-14 19:43:41 UTC (rev 2145)
@@ -189,7 +189,7 @@
   remove_pcomm(this);
 }
 
-void MBParallelComm::add_pcomm(MBParallelComm *pc) 
+int MBParallelComm::add_pcomm(MBParallelComm *pc) 
 {
     // add this pcomm to instance tag
   std::vector<MBParallelComm *> pc_array(MAX_SHARING_PROCS, 
@@ -198,15 +198,19 @@
   assert(0 != pc_tag);
   
   MBErrorCode result = mbImpl->tag_get_data(pc_tag, 0, 0, (void*)&pc_array[0]);
-  if (MB_SUCCESS != result && MB_TAG_NOT_FOUND != result) return;
+  if (MB_SUCCESS != result && MB_TAG_NOT_FOUND != result) 
+    return -1;
   int index = 0;
   while (index < MAX_SHARING_PROCS && pc_array[index]) index++;
-  if (index == MAX_SHARING_PROCS)
+  if (index == MAX_SHARING_PROCS) {
+    index = -1;
     assert(false);
+  }
   else {
     pc_array[index] = pc;
     mbImpl->tag_set_data(pc_tag, 0, 0, (void*)&pc_array[0]);
   }
+  return index;
 }
 
 void MBParallelComm::remove_pcomm(MBParallelComm *pc) 

Modified: MOAB/trunk/parallel/MBParallelComm.hpp
===================================================================
--- MOAB/trunk/parallel/MBParallelComm.hpp	2008-10-14 19:42:14 UTC (rev 2144)
+++ MOAB/trunk/parallel/MBParallelComm.hpp	2008-10-14 19:43:41 UTC (rev 2145)
@@ -52,13 +52,13 @@
     //! constructor
   MBParallelComm(MBInterface *impl,
                  MPI_Comm comm = MPI_COMM_WORLD,
-                 int* pcomm_id_out);
+                 int* pcomm_id_out = 0);
 
     //! constructor taking packed buffer, for testing
   MBParallelComm(MBInterface *impl,
                  std::vector<unsigned char> &tmp_buff,
                  MPI_Comm comm = MPI_COMM_WORLD,
-                 int* pcomm_id_out);
+                 int* pcomm_id_out = 0);
 
 
     //! get the indexed pcomm object from the interface

Modified: MOAB/trunk/parallel/WriteHDF5Parallel.cpp
===================================================================
--- MOAB/trunk/parallel/WriteHDF5Parallel.cpp	2008-10-14 19:42:14 UTC (rev 2144)
+++ MOAB/trunk/parallel/WriteHDF5Parallel.cpp	2008-10-14 19:43:41 UTC (rev 2145)
@@ -1978,8 +1978,7 @@
           tag_name == PARALLEL_SHARED_PROCS_TAG_NAME ||
           tag_name == PARALLEL_SHARED_HANDLE_TAG_NAME ||
           tag_name == PARALLEL_SHARED_HANDLES_TAG_NAME ||
-          tag_name == PARALLEL_STATUS_TAG_NAME ||
-          tag_name == PARALLEL_COMM_TAG_NAME
+          tag_name == PARALLEL_STATUS_TAG_NAME 
           ))
         all_tags.insert(*vit);
     }




More information about the moab-dev mailing list