diff --git a/src/MAKE/Makefile.redsky b/src/MAKE/Makefile.redsky index ea9e5bd148..6242e3fb7e 100644 --- a/src/MAKE/Makefile.redsky +++ b/src/MAKE/Makefile.redsky @@ -2,25 +2,17 @@ SHELL = /bin/sh -# this Makefile builds LAMMPS for RedSky with OpenMPI -# to invoke this Makefile, you need these modules loaded: -# mpi/openmpi-1.4.1_oobpr_intel-11.1-f064-c064 -# misc/env-openmpi-1.4-oobpr -# compilers/intel-11.1-f064-c064 -# libraries/intel-mkl-11.1.064 -# libraries/fftw-2.1.5_openmpi-1.4.1_oobpr_intel-11.1-f064-c064 -# you can determine which modules are loaded by typing: +# This Makefile builds LAMMPS for RedSky with OpenMPI. +# To use this Makefile, you need appropriate modules loaded. +# You can determine which modules are loaded by typing: # module list -# these modules are not the default ones, but can be enabled by -# lines like this in your .cshrc or other start-up shell file -# or by typing them before you build LAMMPS: -# module load mpi/openmpi-1.4.3_oobpr_intel-11.1-f064-c064 -# module load misc/env-openmpi-1.4-oobpr -# module load compilers/intel-11.1-f064-c064 -# module load libraries/intel-mkl-11.1.064 -# module load libraries/fftw-2.1.5_openmpi-1.4.3_oobpr_intel-11.1-f064-c064 -# these same modules need to be loaded to submit a LAMMPS job, -# either interactively or via a batch script +# These modules can be enabled by lines like this in your .cshrc or +# other start-up shell file or by typing them before you build LAMMPS: +# module load mpi/openmpi-1.4.2_oobpr_intel-11.1-f064-c064 +# module load libraries/intel-mkl-11.1.064 +# module load libraries/fftw-2.1.5_openmpi-1.4.2_oobpr_intel-11.1-f064-c064 +# These same modules need to be loaded to submit a LAMMPS job, +# either interactively or via a batch script. # IMPORTANT NOTE: # to run efficiently on RedSky, use the "numa_wrapper" mpiexec option, diff --git a/src/finish.cpp b/src/finish.cpp index b0427da1da..5f5bea9121 100644 --- a/src/finish.cpp +++ b/src/finish.cpp @@ -618,8 +618,10 @@ void Finish::end(int flag) if (atom->molecular && atom->natoms > 0) fprintf(screen,"Ave special neighs/atom = %g\n", nspec_all/atom->natoms); - fprintf(screen,"Neighbor list builds = %d\n",neighbor->ncalls); - fprintf(screen,"Dangerous builds = %d\n",neighbor->ndanger); + fprintf(screen,"Neighbor list builds = " BIGINT_FORMAT "\n", + neighbor->ncalls); + fprintf(screen,"Dangerous builds = " BIGINT_FORMAT "\n", + neighbor->ndanger); } if (logfile) { if (nall < 2.0e9) @@ -631,8 +633,10 @@ void Finish::end(int flag) if (atom->molecular && atom->natoms > 0) fprintf(logfile,"Ave special neighs/atom = %g\n", nspec_all/atom->natoms); - fprintf(logfile,"Neighbor list builds = %d\n",neighbor->ncalls); - fprintf(logfile,"Dangerous builds = %d\n",neighbor->ndanger); + fprintf(logfile,"Neighbor list builds = " BIGINT_FORMAT "\n", + neighbor->ncalls); + fprintf(logfile,"Dangerous builds = " BIGINT_FORMAT "\n", + neighbor->ndanger); } } } diff --git a/src/library.cpp b/src/library.cpp index 6a861a60aa..dcb52cff0c 100644 --- a/src/library.cpp +++ b/src/library.cpp @@ -161,7 +161,7 @@ void *lammps_extract_atom(void *ptr, char *name) for the entity which the caller can cast to the proper data type returns a NULL if id is not recognized or style/type not supported IMPORTANT: if the compute is not current it will be invoked - LAMMPS cannot easily check if it is valid to invoke the compute, + LAMMPS cannot easily check here if it is valid to invoke the compute, so caller must insure that it is OK ------------------------------------------------------------------------- */ @@ -244,7 +244,7 @@ void *lammps_extract_compute(void *ptr, char *id, int style, int type) double *dptr = (double *) lammps_extract_fix(); double value = *dptr; free(dptr); - IMPORTANT: LAMMPS cannot easily check when info extracted from + IMPORTANT: LAMMPS cannot easily check here when info extracted from the fix is valid, so caller must insure that it is OK ------------------------------------------------------------------------- */ @@ -313,7 +313,7 @@ void *lammps_extract_fix(void *ptr, char *id, int style, int type, double *vector = (double *) lammps_extract_variable(); use the vector values free(vector); - IMPORTANT: LAMMPS cannot easily check when it is valid to evaluate + IMPORTANT: LAMMPS cannot easily check here when it is valid to evaluate the variable or any fixes or computes or thermodynamic info it references, so caller must insure that it is OK ------------------------------------------------------------------------- */ diff --git a/src/neighbor.cpp b/src/neighbor.cpp index 7dbcbb701f..240a150a5c 100644 --- a/src/neighbor.cpp +++ b/src/neighbor.cpp @@ -1259,14 +1259,16 @@ int Neighbor::check_distance() /* ---------------------------------------------------------------------- build all perpetual neighbor lists every few timesteps pairwise & topology lists are created as needed + topology lists only built if topoflag = 1 ------------------------------------------------------------------------- */ -void Neighbor::build() +void Neighbor::build(int topoflag) { int i; ago = 0; ncalls++; + lastcall = update->ntimestep; // store current atom positions and box size if needed @@ -1336,12 +1338,20 @@ void Neighbor::build() for (i = 0; i < nblist; i++) (this->*pair_build[blist[i]])(lists[blist[i]]); - if (atom->molecular) { - if (force->bond) (this->*bond_build)(); - if (force->angle) (this->*angle_build)(); - if (force->dihedral) (this->*dihedral_build)(); - if (force->improper) (this->*improper_build)(); - } + if (atom->molecular && topoflag) build_topology(); +} + +/* ---------------------------------------------------------------------- + build all topology neighbor lists every few timesteps + normally built with pair lists, but USER-CUDA separates them +------------------------------------------------------------------------- */ + +void Neighbor::build_topology() +{ + if (force->bond) (this->*bond_build)(); + if (force->angle) (this->*angle_build)(); + if (force->dihedral) (this->*dihedral_build)(); + if (force->improper) (this->*improper_build)(); } /* ---------------------------------------------------------------------- diff --git a/src/neighbor.h b/src/neighbor.h index 0b178a3568..6bcb38ae55 100644 --- a/src/neighbor.h +++ b/src/neighbor.h @@ -38,8 +38,9 @@ class Neighbor : protected Pointers { double cutneighmax; // max neighbor cutoff for all type pairs double *cuttype; // for each type, max neigh cut w/ others - int ncalls; // # of times build has been called - int ndanger; // # of dangerous builds + bigint ncalls; // # of times build has been called + bigint ndanger; // # of dangerous builds + bigint lastcall; // timestep of last neighbor::build() call int nrequest; // requests for pairwise neighbor lists class NeighRequest **requests; // from Pair, Fix, Compute, Command classes @@ -70,7 +71,8 @@ class Neighbor : protected Pointers { int decide(); // decide whether to build or not virtual int check_distance(); // check max distance moved since last build void setup_bins(); // setup bins based on box and cutoff - virtual void build(); // create all neighbor lists (pair,bond) + virtual void build(int topoflag=1); // create all neighbor lists (pair,bond) + virtual void build_topology(); // create all topology neighbor lists void build_one(int); // create a single neighbor list void set(int, char **); // set neighbor style and skin distance void modify_params(int, char**); // modify parameters that control builds