git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@11293 f3b2605a-c512-4ea7-a41b-209d697bcdaa

This commit is contained in:
sjplimp
2014-01-22 17:44:32 +00:00
parent 25613401a4
commit 127eb167c1
60 changed files with 421 additions and 375 deletions

View File

@ -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;
}