[MOAB-dev] r5749 - MOAB/trunk/tools/mbcoupler

iulian at mcs.anl.gov iulian at mcs.anl.gov
Tue Sep 25 01:25:56 CDT 2012


Author: iulian
Date: 2012-09-25 01:25:55 -0500 (Tue, 25 Sep 2012)
New Revision: 5749

Modified:
   MOAB/trunk/tools/mbcoupler/Coupler.cpp
   MOAB/trunk/tools/mbcoupler/mbcoupler_test.cpp
Log:
the initial box test needs to have the same absolute epsilon, otherwise 
some points might be left out. Vijay asked about it at some point today,
but I, of course, dismissed the question.
still, some problems appear later, but at least there are no missing points
now, when we increase the number of processors
also, I am printing more things in the coupler, maybe these should be removed 
when we fix the other problems that appear.


Modified: MOAB/trunk/tools/mbcoupler/Coupler.cpp
===================================================================
--- MOAB/trunk/tools/mbcoupler/Coupler.cpp	2012-09-24 17:25:39 UTC (rev 5748)
+++ MOAB/trunk/tools/mbcoupler/Coupler.cpp	2012-09-25 06:25:55 UTC (rev 5749)
@@ -291,9 +291,9 @@
       if (j == my_rank) continue;
       
         // test if point is in proc's box
-      if (allBoxes[6*j] <= xyz[i] && xyz[i] <= allBoxes[6*j+3] && 
-          allBoxes[6*j+1] <= xyz[i+1] && xyz[i+1] <= allBoxes[6*j+4] && 
-          allBoxes[6*j+2] <= xyz[i+2] && xyz[i+2] <= allBoxes[6*j+5])
+      if ( (allBoxes[6*j] <= xyz[i]+abs_eps) && ( xyz[i] <= allBoxes[6*j+3]+abs_eps) &&
+          (allBoxes[6*j+1] <= xyz[i+1]+abs_eps) && (xyz[i+1] <= allBoxes[6*j+4]+abs_eps) &&
+          (allBoxes[6*j+2] <= xyz[i+2]+abs_eps) && (xyz[i+2] <= allBoxes[6*j+5]+abs_eps))
       {
           // if in this proc's box, will send to proc to test further
           // check size, grow if we're at max
@@ -311,10 +311,14 @@
     }
   }
 
+  printf("rank: %d local points: %d, nb sent target pts: %d mappedPts: %d \n",
+           my_rank, num_points, target_pts.get_n(), mappedPts->get_n());
     // perform scatter/gather, to gather points to source mesh procs
   if (myPc) {
     (myPc->proc_config().crystal_router())->gs_transfer(1, target_pts, 0);
 
+    printf("rank: %d after first gs nb received_pts: %d\n",
+               my_rank, target_pts.get_n());
       // after scatter/gather:
       // target_pts.set_n( # points local proc has to map );
       // target_pts.vi_wr[2*i] = proc sending point i
@@ -344,8 +348,13 @@
       // no longer need target_pts
     target_pts.reset();
 
+    printf("rank: %d nb sent source pts: %d, mappedPts now: %d\n",
+                   my_rank, source_pts.get_n(),  mappedPts->get_n());
       // send target points back to target procs
     (myPc->proc_config().crystal_router())->gs_transfer(1, source_pts, 0);
+
+    printf("rank: %d nb received source pts: %d\n",
+                       my_rank, source_pts.get_n());
   }
   
   // store proc/index tuples in targetPts, and/or pass back to application;
@@ -380,9 +389,9 @@
 
       int locIndex = source_pts.vi_rd[3*i+1];
       if(located_pts[locIndex]){  
-	//asked 2+ procs if they have point p, they both said yes, we'll keep the one with lowest rank


More information about the moab-dev mailing list