mirror of https://github.com/lammps/lammps.git
use tagint instead of int when communicating atom ids
This commit is contained in:
parent
88d160f86e
commit
a9c376f20d
|
@ -637,14 +637,14 @@ void FixPIMD::comm_exec(double **ptr)
|
|||
if(nsend > max_nsend)
|
||||
{
|
||||
max_nsend = nsend+200;
|
||||
tag_send = (int*) memory->srealloc(tag_send, sizeof(int)*max_nsend, "FixPIMD:tag_send");
|
||||
tag_send = (tagint*) memory->srealloc(tag_send, sizeof(tagint)*max_nsend, "FixPIMD:tag_send");
|
||||
buf_send = (double*) memory->srealloc(buf_send, sizeof(double)*max_nsend*3, "FixPIMD:x_send");
|
||||
}
|
||||
|
||||
// send tags
|
||||
|
||||
MPI_Sendrecv( atom->tag, nlocal, MPI_INT, plan_send[iplan], 0,
|
||||
tag_send, nsend, MPI_INT, plan_recv[iplan], 0, universe->uworld, MPI_STATUS_IGNORE);
|
||||
MPI_Sendrecv( atom->tag, nlocal, MPI_LMP_TAGINT, plan_send[iplan], 0,
|
||||
tag_send, nsend, MPI_LMP_TAGINT, plan_recv[iplan], 0, universe->uworld, MPI_STATUS_IGNORE);
|
||||
|
||||
// wrap positions
|
||||
|
||||
|
@ -661,7 +661,7 @@ void FixPIMD::comm_exec(double **ptr)
|
|||
|
||||
sprintf(error_line, "Atom " TAGINT_FORMAT " is missing at world [%d] "
|
||||
"rank [%d] required by rank [%d] (" TAGINT_FORMAT ", "
|
||||
TAGINT_FORMAT ", " TAGINT_FORMAT ").\n",tag_send[i],
|
||||
TAGINT_FORMAT ", " TAGINT_FORMAT ").\n", tag_send[i],
|
||||
universe->iworld, comm->me, plan_recv[iplan],
|
||||
atom->tag[0], atom->tag[1], atom->tag[2]);
|
||||
|
||||
|
|
|
@ -68,7 +68,7 @@ class FixPIMD : public Fix {
|
|||
/* inter-partition communication */
|
||||
|
||||
int max_nsend;
|
||||
int* tag_send;
|
||||
tagint* tag_send;
|
||||
double *buf_send;
|
||||
|
||||
int max_nlocal;
|
||||
|
|
Loading…
Reference in New Issue