forked from lijiext/lammps
Merge pull request #1388 from lammps/tiled-bug
bug fix for tiled communication at cutoffs near box size
This commit is contained in:
commit
93f531441a
|
@ -1255,14 +1255,14 @@ void Balance::dumpout(bigint tstep)
|
|||
int m = 0;
|
||||
for (int i = 0; i < nprocs; i++) {
|
||||
domain->lamda_box_corners(&boxall[i][0],&boxall[i][3]);
|
||||
fprintf(fp,"%d %d %g %g %g\n",m+1,1,bc[0][0],bc[0][1],bc[0][1]);
|
||||
fprintf(fp,"%d %d %g %g %g\n",m+2,1,bc[1][0],bc[1][1],bc[1][1]);
|
||||
fprintf(fp,"%d %d %g %g %g\n",m+3,1,bc[2][0],bc[2][1],bc[2][1]);
|
||||
fprintf(fp,"%d %d %g %g %g\n",m+4,1,bc[3][0],bc[3][1],bc[3][1]);
|
||||
fprintf(fp,"%d %d %g %g %g\n",m+5,1,bc[4][0],bc[4][1],bc[4][1]);
|
||||
fprintf(fp,"%d %d %g %g %g\n",m+6,1,bc[5][0],bc[5][1],bc[5][1]);
|
||||
fprintf(fp,"%d %d %g %g %g\n",m+7,1,bc[6][0],bc[6][1],bc[6][1]);
|
||||
fprintf(fp,"%d %d %g %g %g\n",m+8,1,bc[7][0],bc[7][1],bc[7][1]);
|
||||
fprintf(fp,"%d %d %g %g %g\n",m+1,1,bc[0][0],bc[0][1],bc[0][2]);
|
||||
fprintf(fp,"%d %d %g %g %g\n",m+2,1,bc[1][0],bc[1][1],bc[1][2]);
|
||||
fprintf(fp,"%d %d %g %g %g\n",m+3,1,bc[2][0],bc[2][1],bc[2][2]);
|
||||
fprintf(fp,"%d %d %g %g %g\n",m+4,1,bc[3][0],bc[3][1],bc[3][2]);
|
||||
fprintf(fp,"%d %d %g %g %g\n",m+5,1,bc[4][0],bc[4][1],bc[4][2]);
|
||||
fprintf(fp,"%d %d %g %g %g\n",m+6,1,bc[5][0],bc[5][1],bc[5][2]);
|
||||
fprintf(fp,"%d %d %g %g %g\n",m+7,1,bc[6][0],bc[6][1],bc[6][2]);
|
||||
fprintf(fp,"%d %d %g %g %g\n",m+8,1,bc[7][0],bc[7][1],bc[7][2]);
|
||||
m += 8;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -512,7 +512,7 @@ void CommTiled::forward_comm(int /*dummy*/)
|
|||
MPI_DOUBLE,recvproc[iswap][i],0,world,&requests[i]);
|
||||
}
|
||||
if (sendother[iswap]) {
|
||||
for (i = 0; i < nsendproc[iswap]; i++) {
|
||||
for (i = 0; i < nsend; i++) {
|
||||
n = avec->pack_comm(sendnum[iswap][i],sendlist[iswap][i],
|
||||
buf_send,pbc_flag[iswap][i],pbc[iswap][i]);
|
||||
MPI_Send(buf_send,n,MPI_DOUBLE,sendproc[iswap][i],0,world);
|
||||
|
|
|
@ -274,10 +274,6 @@ void FixBalance::rebalance()
|
|||
comm->layout = Comm::LAYOUT_TILED;
|
||||
}
|
||||
|
||||
// output of new decomposition
|
||||
|
||||
if (balance->outflag) balance->dumpout(update->ntimestep);
|
||||
|
||||
// reset proc sub-domains
|
||||
// check and warn if any proc's subbox is smaller than neigh skin
|
||||
// since may lead to lost atoms in comm->exchange()
|
||||
|
@ -286,12 +282,17 @@ void FixBalance::rebalance()
|
|||
domain->set_local_box();
|
||||
domain->subbox_too_small_check(neighbor->skin);
|
||||
|
||||
// output of new decomposition
|
||||
|
||||
if (balance->outflag) balance->dumpout(update->ntimestep);
|
||||
|
||||
// move atoms to new processors via irregular()
|
||||
// for non-RCB only needed if migrate_check() says an atom moves too far
|
||||
// else allow caller's comm->exchange() to do it
|
||||
// set disable = 0, so weights migrate with atoms
|
||||
// important to delay disable = 1 until after pre_neighbor imbfinal calc
|
||||
// b/c atoms may migrate again in comm->exchange()
|
||||
// NOTE: for reproducible debug runs, set 1st arg of migrate_atoms() to 1
|
||||
|
||||
if (domain->triclinic) domain->x2lamda(atom->nlocal);
|
||||
if (wtflag) balance->fixstore->disable = 0;
|
||||
|
|
Loading…
Reference in New Issue