From de0c8d1f141f17255be373dbc7556b90cbd9d4d7 Mon Sep 17 00:00:00 2001 From: sjplimp Date: Thu, 8 May 2014 14:51:32 +0000 Subject: [PATCH 1/3] git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@11946 f3b2605a-c512-4ea7-a41b-209d697bcdaa --- src/balance.cpp | 2 +- src/change_box.cpp | 2 +- src/create_atoms.cpp | 2 +- src/displace_atoms.cpp | 2 +- src/irregular.cpp | 10 ++++------ src/irregular.h | 4 ++-- src/read_dump.cpp | 2 +- src/read_restart.cpp | 3 ++- 8 files changed, 13 insertions(+), 14 deletions(-) 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 1ca51a51c9..eba889c767 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); From f22c160cd9654d0c84d78f0e3b4abb43a58767fc Mon Sep 17 00:00:00 2001 From: sjplimp Date: Thu, 8 May 2014 23:15:29 +0000 Subject: [PATCH 2/3] git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@11947 f3b2605a-c512-4ea7-a41b-209d697bcdaa --- src/version.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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" From 90f055351fee9c21abddf1cf73fcd0076f7ef9de Mon Sep 17 00:00:00 2001 From: sjplimp Date: Thu, 8 May 2014 23:15:30 +0000 Subject: [PATCH 3/3] git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@11948 f3b2605a-c512-4ea7-a41b-209d697bcdaa --- doc/Manual.html | 4 ++-- doc/Manual.txt | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/Manual.html b/doc/Manual.html index 1a48d14c9f..5bbb5cd58c 100644 --- a/doc/Manual.html +++ b/doc/Manual.html @@ -1,7 +1,7 @@ LAMMPS Users Manual - + @@ -22,7 +22,7 @@

LAMMPS Documentation

-

9 May 2014 version +

10 May 2014 version

Version info:

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

LAMMPS Documentation :c,h3 -9 May 2014 version :c,h4 +10 May 2014 version :c,h4 Version info: :h4