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

This commit is contained in:
sjplimp 2012-08-13 19:56:01 +00:00
parent 75bdc11ae3
commit d615f1191e
5 changed files with 43 additions and 35 deletions

View File

@ -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,

View File

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

View File

@ -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
------------------------------------------------------------------------- */

View File

@ -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)();
}
/* ----------------------------------------------------------------------

View File

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