[MOAB-dev] r4427 - MOAB/trunk/src/io

kraftche at cae.wisc.edu kraftche at cae.wisc.edu
Tue Jan 11 10:13:41 CST 2011


Author: kraftche
Date: 2011-01-11 10:13:41 -0600 (Tue, 11 Jan 2011)
New Revision: 4427

Modified:
   MOAB/trunk/src/io/ReadHDF5.cpp
Log:
don't segfault if debug output is enabled for ReadHDF5 when PARALLEL!=READ_PART

Modified: MOAB/trunk/src/io/ReadHDF5.cpp
===================================================================
--- MOAB/trunk/src/io/ReadHDF5.cpp	2011-01-11 14:40:09 UTC (rev 4426)
+++ MOAB/trunk/src/io/ReadHDF5.cpp	2011-01-11 16:13:41 UTC (rev 4427)
@@ -134,11 +134,13 @@
 void ReadHDF5::debug_barrier_line(int lineno)
 {
 #ifdef USE_MPI
-  const unsigned threshold = 2;
-  static unsigned long count = 0;
-  if (dbgOut.get_verbosity() >= threshold) {
-    dbgOut.printf( threshold, "*********** Debug Barrier %lu (@%d)***********\n", ++count, lineno);
-    MPI_Barrier( myPcomm->proc_config().proc_comm() );
+  if (mpiComm) {
+    const unsigned threshold = 2;
+    static unsigned long count = 0;
+    if (dbgOut.get_verbosity() >= threshold) {
+      dbgOut.printf( threshold, "*********** Debug Barrier %lu (@%d)***********\n", ++count, lineno);
+      MPI_Barrier( *mpiComm );
+    }
   }
 #endif
 }






























More information about the moab-dev mailing list