enforce that the number of neighbors cannot be negative (e.g. w/o neighbor list)
This commit is contained in:
@ -483,7 +483,7 @@ void Finish::end(int flag)
|
|||||||
if (neighflag) {
|
if (neighflag) {
|
||||||
if (me == 0) utils::logmesg(lmp,"\n");
|
if (me == 0) utils::logmesg(lmp,"\n");
|
||||||
|
|
||||||
tmp = MAX(nneigh,nneighfull);
|
tmp = MAX(MAX(nneigh,nneighfull),0.0);
|
||||||
double nall;
|
double nall;
|
||||||
MPI_Allreduce(&tmp,&nall,1,MPI_DOUBLE,MPI_SUM,world);
|
MPI_Allreduce(&tmp,&nall,1,MPI_DOUBLE,MPI_SUM,world);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user