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

iulian at mcs.anl.gov iulian at mcs.anl.gov
Thu Nov 15 19:06:35 CST 2012


Author: iulian
Date: 2012-11-15 19:06:34 -0600 (Thu, 15 Nov 2012)
New Revision: 5869

Modified:
   MOAB/trunk/src/io/ReadNC.cpp
Log:
if not running in parallel, myPcomm is uninitialized, even if
built with MPI. check if we are indeed running in parallel.


Modified: MOAB/trunk/src/io/ReadNC.cpp
===================================================================
--- MOAB/trunk/src/io/ReadNC.cpp	2012-11-15 16:17:03 UTC (rev 5868)
+++ MOAB/trunk/src/io/ReadNC.cpp	2012-11-16 01:06:34 UTC (rev 5869)
@@ -1291,9 +1291,14 @@
 
 #ifdef USE_MPI
   moab::Range quads_owned;
-  rval = myPcomm->filter_pstatus(quads, PSTATUS_NOT_OWNED, PSTATUS_NOT, -1,
+  if (isParallel)
+  {
+    rval = myPcomm->filter_pstatus(quads, PSTATUS_NOT_OWNED, PSTATUS_NOT, -1,
       &quads_owned);
-  ERRORR(rval, "Trouble getting owned quads in set.");
+    ERRORR(rval, "Trouble getting owned quads in set.");
+  }
+  else
+    quads_owned=quads;// not running in parallel, but still with MPI
 #endif
 
   for (unsigned int i = 0; i < vdatas.size(); i++) {



More information about the moab-dev mailing list