[MOAB-dev] r5620 - in MOAB/branches/NCparperiodic: src src/io src/moab test/parallel

tautges at mcs.anl.gov tautges at mcs.anl.gov
Fri Jun 29 19:34:27 CDT 2012


Author: tautges
Date: 2012-06-29 19:34:27 -0500 (Fri, 29 Jun 2012)
New Revision: 5620

Modified:
   MOAB/branches/NCparperiodic/src/ScdInterface.cpp
   MOAB/branches/NCparperiodic/src/io/ReadNC.cpp
   MOAB/branches/NCparperiodic/src/moab/ScdInterface.hpp
   MOAB/branches/NCparperiodic/test/parallel/Makefile.am
Log:
Lots of bug fixes, scdpart now works (on 2 procs at least).



Modified: MOAB/branches/NCparperiodic/src/ScdInterface.cpp
===================================================================
--- MOAB/branches/NCparperiodic/src/ScdInterface.cpp	2012-06-29 21:39:36 UTC (rev 5619)
+++ MOAB/branches/NCparperiodic/src/ScdInterface.cpp	2012-06-30 00:34:27 UTC (rev 5620)
@@ -676,12 +676,14 @@
   pto = -1;
   across_bdy[0] = across_bdy[1] = 0;
   
-  int ldims[6], pijk[3], lperiodic[3];
+  int ldims[6], pijk[3], lperiodic[2];
   ErrorCode rval = compute_partition_alljkbal(np, pfrom, gdims, gperiodic, 
                                               ldims, lperiodic, pijk);
   if (MB_SUCCESS != rval) return rval;
   assert(pijk[1] * pijk[2] == np);
   pto = -1;
+  bool bot_j = pfrom < pijk[2],
+      top_j = pfrom > np - pijk[2];
   if ((1 == pijk[2] && dijk[2]) ||  // 1d in j means no neighbors with dk != 0
       (!(pfrom%pijk[2]) && -1 == dijk[2]) || // at -k bdy
       (pfrom%pijk[2] == pijk[2]-1 && 1 == dijk[2]) || // at +k bdy
@@ -699,7 +701,7 @@
     int dj = (gdims[4] - gdims[1]) / pijk[1], extra = (gdims[4] - gdims[1]) % pijk[1];
     if (-1 == dijk[1]) {
       facedims[4] = facedims[1];
-      if (pfrom < pijk[2]) {
+      if (bot_j) {
           // going across periodic lower bdy in j
         rdims[4] = gdims[4];
         across_bdy[1] = -1;
@@ -713,7 +715,7 @@
     else {
       if (pfrom > np-pijk[2]) facedims[4] = gdims[1];
       facedims[1] = facedims[4];
-      if (pfrom > np - pijk[2]) {
+      if (top_j) {
           // going across periodic upper bdy in j
         rdims[1] = gdims[1];
         across_bdy[1] = 1;
@@ -742,22 +744,21 @@
     }
   }
 
-  assert(-1 == pto ||
-         (rdims[0] >= gdims[0] && rdims[3] <= gdims[3] && 
-          rdims[1] >= gdims[1] && rdims[4] <= gdims[4] && 
-          rdims[2] >= gdims[2] && rdims[5] <= gdims[5] &&
-          (facedims[0] >= rdims[0] || (gperiodic[0] && rdims[3] == gdims[3] && facedims[0] == gdims[0])) && 
-          facedims[3] <= rdims[3] &&
-          (facedims[1] >= rdims[1]  || (gperiodic[1] && rdims[4] == gdims[4] && facedims[1] == gdims[1])) && 
-          facedims[4] <= rdims[4] &&
-          facedims[2] >= rdims[2] && 


More information about the moab-dev mailing list