git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@11293 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
@ -292,13 +292,13 @@ void CreateAtoms::command(int narg, char **arg)
|
||||
// moloffset = max molecule ID for all molecules owned by previous procs
|
||||
// including molecules existing before this creation
|
||||
|
||||
int moloffset;
|
||||
int *molecule = atom->molecule;
|
||||
tagint moloffset;
|
||||
tagint *molecule = atom->molecule;
|
||||
if (molecule) {
|
||||
int max = 0;
|
||||
tagint max = 0;
|
||||
for (int i = 0; i < nlocal_previous; i++) max = MAX(max,molecule[i]);
|
||||
int maxmol;
|
||||
MPI_Allreduce(&max,&maxmol,1,MPI_INT,MPI_MAX,world);
|
||||
tagint maxmol;
|
||||
MPI_Allreduce(&max,&maxmol,1,MPI_LMP_TAGINT,MPI_MAX,world);
|
||||
MPI_Scan(&molcreate,&moloffset,1,MPI_INT,MPI_SUM,world);
|
||||
moloffset = moloffset - molcreate + maxmol;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user