fix issues in FixNeighHistory and FixNeighHistoryOMP reported in https://sourceforge.net/p/lammps/mailman/message/36138319/
This supersedes and closes PR #734
This commit is contained in:
@ -356,7 +356,7 @@ void FixNeighHistoryOMP::pre_exchange_newton()
|
||||
#endif
|
||||
{
|
||||
maxpartner = MAX(m,maxpartner);
|
||||
comm->maxexchange_fix = MAX(comm->maxexchange_fix,4*maxpartner+1);
|
||||
comm->maxexchange_fix = MAX(comm->maxexchange_fix,(dnum+1)*maxpartner+1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -424,7 +424,7 @@ void FixNeighHistory::pre_exchange_newton()
|
||||
|
||||
maxpartner = 0;
|
||||
for (i = 0; i < nlocal_neigh; i++) maxpartner = MAX(maxpartner,npartner[i]);
|
||||
comm->maxexchange_fix = MAX(comm->maxexchange_fix,4*maxpartner+1);
|
||||
comm->maxexchange_fix = MAX(comm->maxexchange_fix,(dnum+1)*maxpartner+1);
|
||||
|
||||
// zero npartner values from previous nlocal_neigh to current nlocal
|
||||
|
||||
@ -720,7 +720,7 @@ int FixNeighHistory::pack_reverse_comm_size(int n, int first)
|
||||
last = first + n;
|
||||
|
||||
for (i = first; i < last; i++)
|
||||
m += 1 + 4*npartner[i];
|
||||
m += 1 + (dnum+1)*npartner[i];
|
||||
|
||||
return m;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user