diff --git a/src/comm_brick.cpp b/src/comm_brick.cpp index c44b41928f..71bc74bb54 100644 --- a/src/comm_brick.cpp +++ b/src/comm_brick.cpp @@ -39,6 +39,9 @@ #include "error.h" #include "memory.h" +// DEBUG +#include "update.h" + using namespace LAMMPS_NS; #define BUFFACTOR 1.5 diff --git a/src/comm_tiled.cpp b/src/comm_tiled.cpp index c07a8e5fba..0167b23b18 100644 --- a/src/comm_tiled.cpp +++ b/src/comm_tiled.cpp @@ -28,6 +28,9 @@ #include "memory.h" #include "error.h" +// DEBUG +#include "update.h" + using namespace LAMMPS_NS; #define BUFFACTOR 1.5 @@ -60,7 +63,7 @@ CommTiled::CommTiled(LAMMPS *lmp) : Comm(lmp) // for Comm is run and thus creating a shallow copy of "oldcomm". // The call to Comm::copy_arrays() then converts the shallow copy // into a deep copy of the class with the new layout. -// + CommTiled::CommTiled(LAMMPS *lmp, Comm *oldcomm) : Comm(*oldcomm) { if (lmp->kokkos) @@ -697,28 +700,14 @@ void CommTiled::exchange() if (x[i][dim] < lo || x[i][dim] >= hi) { if (nsend > maxsend) grow_send(nsend,1); proc = (this->*point_drop)(dim,x[i]); - - /* - // DEBUG: - // test if proc is not in exch list, means will lose atom - // could be that *should* lose atom - int flag = 0; - for (int k = 0; k < nexchproc[dim]; k++) - if (proc == exchproc[k]) flag = 1; - if (!flag) - printf("Losing exchange atom: dim %d me %d %proc %d: %g %g %g\n", - dim,me,proc,x[i][0],x[i][1],x[i][2]); - */ - if (proc != me) { buf_send[nsend++] = proc; nsend += avec->pack_exchange(i,&buf_send[nsend]); - avec->copy(nlocal-1,i,1); - nlocal--; - } else i++; + } + avec->copy(nlocal-1,i,1); + nlocal--; } else i++; } - atom->nlocal = nlocal; // send and recv atoms from neighbor procs that touch my sub-box in dim @@ -1693,10 +1682,7 @@ int CommTiled::point_drop_brick(int idim, double *x) } /* ---------------------------------------------------------------------- - determine overlap list of Noverlap procs the lo/hi box overlaps - overlap = non-zero area in common between box and proc sub-domain - recursive method for traversing an RCB tree of cuts - no need to split lo/hi box as recurse b/c OK if box extends outside RCB box + determine which proc owns point x via recursion thru RCB tree ------------------------------------------------------------------------- */ int CommTiled::point_drop_tiled(int idim, double *x)