diff --git a/doc/Manual.html b/doc/Manual.html index 6c68be1bc5..ab7240855f 100644 --- a/doc/Manual.html +++ b/doc/Manual.html @@ -1,7 +1,7 @@ LAMMPS-ICMS Users Manual - + @@ -22,7 +22,7 @@

LAMMPS-ICMS Documentation

-

9 May 2014 version +

10 May 2014 version

Version info:

diff --git a/doc/Manual.txt b/doc/Manual.txt index c8c17b355d..d7a4964bad 100644 --- a/doc/Manual.txt +++ b/doc/Manual.txt @@ -1,6 +1,6 @@ LAMMPS-ICMS Users Manual - + @@ -18,7 +18,7 @@

LAMMPS-ICMS Documentation :c,h3 -9 May 2014 version :c,h4 +10 May 2014 version :c,h4 Version info: :h4 diff --git a/src/balance.cpp b/src/balance.cpp index 459c37febc..ccca989369 100644 --- a/src/balance.cpp +++ b/src/balance.cpp @@ -300,7 +300,7 @@ void Balance::command(int narg, char **arg) if (domain->triclinic) domain->x2lamda(atom->nlocal); Irregular *irregular = new Irregular(lmp); - irregular->migrate_atoms(); + irregular->migrate_atoms(1); delete irregular; if (domain->triclinic) domain->lamda2x(atom->nlocal); diff --git a/src/change_box.cpp b/src/change_box.cpp index fcc90b7512..4237e973b2 100644 --- a/src/change_box.cpp +++ b/src/change_box.cpp @@ -362,7 +362,7 @@ void ChangeBox::command(int narg, char **arg) if (domain->triclinic) domain->x2lamda(atom->nlocal); domain->reset_box(); Irregular *irregular = new Irregular(lmp); - irregular->migrate_atoms(); + irregular->migrate_atoms(1); delete irregular; if (domain->triclinic) domain->lamda2x(atom->nlocal); diff --git a/src/create_atoms.cpp b/src/create_atoms.cpp index a9393729b7..be5c479360 100644 --- a/src/create_atoms.cpp +++ b/src/create_atoms.cpp @@ -400,7 +400,7 @@ void CreateAtoms::command(int narg, char **arg) if (domain->triclinic) domain->x2lamda(atom->nlocal); domain->reset_box(); Irregular *irregular = new Irregular(lmp); - irregular->migrate_atoms(); + irregular->migrate_atoms(1); delete irregular; if (domain->triclinic) domain->lamda2x(atom->nlocal); } diff --git a/src/displace_atoms.cpp b/src/displace_atoms.cpp index 4a62647395..1c08439455 100644 --- a/src/displace_atoms.cpp +++ b/src/displace_atoms.cpp @@ -270,7 +270,7 @@ void DisplaceAtoms::command(int narg, char **arg) if (domain->triclinic) domain->x2lamda(atom->nlocal); domain->reset_box(); Irregular *irregular = new Irregular(lmp); - irregular->migrate_atoms(); + irregular->migrate_atoms(1); delete irregular; if (domain->triclinic) domain->lamda2x(atom->nlocal); diff --git a/src/irregular.cpp b/src/irregular.cpp index 6b3ade751e..e708c49598 100644 --- a/src/irregular.cpp +++ b/src/irregular.cpp @@ -78,7 +78,7 @@ Irregular::~Irregular() for triclinic: atoms must be in lamda coords (0-1) before this is called ------------------------------------------------------------------------- */ -void Irregular::migrate_atoms() +void Irregular::migrate_atoms(int sortflag) { // clear global->local map since atoms move to new procs // clear old ghosts so map_set() at end will operate only on local atoms @@ -145,10 +145,8 @@ void Irregular::migrate_atoms() // create irregular communication plan, perform comm, destroy plan // returned nrecv = size of buffer needed for incoming atoms - // debug: turn on sorting for repoducible irregular() via extra final arg - //int nrecv = create_atom(nsendatom,sizes,proclist,1); - int nrecv = create_atom(nsendatom,sizes,proclist); + int nrecv = create_atom(nsendatom,sizes,proclist,sortflag); if (nrecv > maxrecv) grow_recv(nrecv); exchange_atom(buf_send,sizes,buf_recv); destroy_atom(); @@ -255,7 +253,7 @@ int Irregular::migrate_check() return total # of doubles I will recv (not including self) ------------------------------------------------------------------------- */ -int Irregular::create_atom(int n, int *sizes, int *proclist, int sort) +int Irregular::create_atom(int n, int *sizes, int *proclist, int sortflag) { int i; @@ -370,7 +368,7 @@ int Irregular::create_atom(int n, int *sizes, int *proclist, int sort) // useful for debugging to insure reproducible ordering of received atoms // invoke by adding final arg = 1 to create_atom() call in migrate_atoms() - if (sort) { + if (sortflag) { int *order = new int[nrecv]; int *proc_recv_ordered = new int[nrecv]; int *length_recv_ordered = new int[nrecv]; diff --git a/src/irregular.h b/src/irregular.h index 40df2eff84..576fad5c90 100644 --- a/src/irregular.h +++ b/src/irregular.h @@ -27,7 +27,7 @@ class Irregular : protected Pointers { Irregular(class LAMMPS *); ~Irregular(); - void migrate_atoms(); + void migrate_atoms(int sortflag = 0); int migrate_check(); int create_data(int, int *); void exchange_data(char *, int, char *); @@ -87,7 +87,7 @@ class Irregular : protected Pointers { PlanAtom *aplan; PlanData *dplan; - int create_atom(int, int *, int *, int sort = 0); + int create_atom(int, int *, int *, int); void exchange_atom(double *, int *, double *); void destroy_atom(); int coord2proc(double *, int &, int &, int &); diff --git a/src/read_dump.cpp b/src/read_dump.cpp index 3256d28a46..f5c9ddc850 100644 --- a/src/read_dump.cpp +++ b/src/read_dump.cpp @@ -547,7 +547,7 @@ void ReadDump::atoms() if (triclinic) domain->x2lamda(atom->nlocal); domain->reset_box(); Irregular *irregular = new Irregular(lmp); - irregular->migrate_atoms(); + irregular->migrate_atoms(1); delete irregular; if (triclinic) domain->lamda2x(atom->nlocal); diff --git a/src/read_restart.cpp b/src/read_restart.cpp index a224bfa2e3..99238e104d 100644 --- a/src/read_restart.cpp +++ b/src/read_restart.cpp @@ -429,13 +429,14 @@ void ReadRestart::command(int narg, char **arg) } // move atoms to new processors via irregular() + // turn sorting on in migrate_atoms() to avoid non-reproducible restarts // in case read by different proc than wrote restart file // first do map_init() since irregular->migrate_atoms() will do map_clear() if (atom->map_style) atom->map_init(); if (domain->triclinic) domain->x2lamda(atom->nlocal); Irregular *irregular = new Irregular(lmp); - irregular->migrate_atoms(); + irregular->migrate_atoms(1); delete irregular; if (domain->triclinic) domain->lamda2x(atom->nlocal); diff --git a/src/version.h b/src/version.h index 08a2177cc9..1dd2ab551d 100644 --- a/src/version.h +++ b/src/version.h @@ -1 +1 @@ -#define LAMMPS_VERSION "9 May 2014" +#define LAMMPS_VERSION "10 May 2014"