[MOAB-dev] r5580 - in MOAB/trunk: src src/io test/io

tautges at mcs.anl.gov tautges at mcs.anl.gov
Thu Jun 14 16:23:45 CDT 2012


Author: tautges
Date: 2012-06-14 16:23:45 -0500 (Thu, 14 Jun 2012)
New Revision: 5580

Modified:
   MOAB/trunk/src/ScdInterface.cpp
   MOAB/trunk/src/io/ReadNC.cpp
   MOAB/trunk/test/io/read_nc.cpp
Log:
A few fixes due to not having run parallel in my last set of changes.



Modified: MOAB/trunk/src/ScdInterface.cpp
===================================================================
--- MOAB/trunk/src/ScdInterface.cpp	2012-06-14 18:25:14 UTC (rev 5579)
+++ MOAB/trunk/src/ScdInterface.cpp	2012-06-14 21:23:45 UTC (rev 5580)
@@ -704,14 +704,14 @@
     int dj = (gdims[4] - gdims[1]) / pj, extra = (gdims[4] - gdims[1]) % pj;
     if (-1 == dijk[1]) {
       facedims[4] = facedims[1];
-      rdims[4] = (nr < pk ? gdims[4] : rdims[0]);
+      rdims[4] = (nr < pk ? gdims[4] : rdims[1]);
       rdims[1] = rdims[4] - dj;
       if (pto < extra) rdims[1]--;
     }
     else {
-      if (nr > np-nk) facedims[4] = gdims[1];
+      if (nr > np-pk) facedims[4] = gdims[1];
       facedims[1] = facedims[4];
-      rdims[1] = (nr > np-nk ? gdims[1] : rdims[4]);
+      rdims[1] = (nr > np-pk ? gdims[1] : rdims[4]);
       rdims[4] = rdims[1] + dj;
       if (pto < extra) rdims[4]++;
     }
@@ -898,7 +898,7 @@
     assert (pto >= 0 && pto < np);
     if (-1 == dijk[1]) {
       facedims[4] = facedims[1];
-      rdims[4] = (bod_j ? gdims[4] : rdims[1]);
+      rdims[4] = (bot_j ? gdims[4] : rdims[1]);
       rdims[1] = rdims[4] - dj;
       if (pto%pj < jextra) rdims[1]--;
     }

Modified: MOAB/trunk/src/io/ReadNC.cpp
===================================================================
--- MOAB/trunk/src/io/ReadNC.cpp	2012-06-14 18:25:14 UTC (rev 5579)
+++ MOAB/trunk/src/io/ReadNC.cpp	2012-06-14 21:23:45 UTC (rev 5580)
@@ -331,7 +331,7 @@
   bool lperiodic_i = false, gperiodic_i = true;
 #ifdef USE_MPI
     // if serial, use a locally-periodic representation, otherwise don't
-  if (myPcomm->proc_config().proc_size() == 1) lperiodic_i = true;
+  if (!isParallel || (myPcomm && myPcomm->proc_config().proc_size() == 1)) lperiodic_i = true;
 #endif  
   ErrorCode rval = scdi->construct_box(HomCoord(lDims[0], lDims[1], (-1 != lDims[2] ? lDims[2] : 0), 1),
                                        HomCoord(lDims[3], lDims[4], (-1 != lDims[5] ? lDims[5] : 0), 1),

Modified: MOAB/trunk/test/io/read_nc.cpp
===================================================================
--- MOAB/trunk/test/io/read_nc.cpp	2012-06-14 18:25:14 UTC (rev 5579)
+++ MOAB/trunk/test/io/read_nc.cpp	2012-06-14 21:23:45 UTC (rev 5580)
@@ -19,6 +19,7 @@


More information about the moab-dev mailing list